Union#
Qualified name: manim.mobject.geometry.boolean\_ops.Union
- class Union(*vmobjects, **kwargs)[source]#
Bases:
_BooleanOps
Union of two or more
VMobject
s. This returns the common region of theVMobject
s.- Parameters
- Raises
ValueError – If less than 2
VMobject
s are passed.
Example
Example: UnionExample ¶
from manim import * class UnionExample(Scene): def construct(self): sq = Square(color=RED, fill_opacity=1) sq.move_to([-2, 0, 0]) cr = Circle(color=BLUE, fill_opacity=1) cr.move_to([-1.3, 0.7, 0]) un = Union(sq, cr, color=GREEN, fill_opacity=1) un.move_to([1.5, 0.3, 0]) self.add(sq, cr, un)
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.