Cutout#
Qualified name: manim.mobject.geometry.polygram.Cutout
- class Cutout(main_shape, *mobjects, **kwargs)[source]#
Bases:
VMobject
A shape with smaller cutouts.
- Parameters
Warning
Technically, this class behaves similar to a symmetric difference: if parts of the
mobjects
are 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
animate
Used to animate the application of any method of
self
.animation_overrides
color
depth
The depth of the mobject.
fill_color
If there are multiple colors (for gradient) this returns the first one
height
The height of the mobject.
n_points_per_curve
sheen_factor
stroke_color
width
The width of the mobject.