Cutout#
Qualified name: manim.mobject.geometry.polygram.Cutout
- class Cutout(main_shape, *mobjects, **kwargs)[source]#
Bases:
VMobjectA shape with smaller cutouts.
- Parameters
Warning
Technically, this class behaves similar to a symmetric difference: if parts of the
mobjectsare not located within themain_shape, these parts will be added to the resultingVMobject.Examples
Example: CutoutExample ¶
from manim import * class CutoutExample(Scene): def construct(self): s1 = Square().scale(2.5) s2 = Triangle().shift(DOWN + RIGHT).scale(0.5) s3 = Square().shift(UP + RIGHT).scale(0.5) s4 = RegularPolygon(5).shift(DOWN + LEFT).scale(0.5) s5 = RegularPolygon(6).shift(UP + LEFT).scale(0.5) c = Cutout(s1, s2, s3, s4, s5, fill_opacity=1, color=BLUE, stroke_color=RED) self.play(Write(c), run_time=4) self.wait()
Methods
Attributes
animateUsed to animate the application of any method of
self.animation_overridescolordepthThe depth of the mobject.
fill_colorIf there are multiple colors (for gradient) this returns the first one
heightThe height of the mobject.
n_points_per_curvesheen_factorstroke_colorwidthThe width of the mobject.