Intersection#
Qualified name: manim.mobject.geometry.boolean\_ops.Intersection
- class Intersection(*vmobjects, **kwargs)[source]#
Bases:
_BooleanOpsFind the intersection of two
VMobjects. This keeps the parts covered by bothVMobjects.- Parameters
vmobjects – The
VMobjectto find the intersection.- Raises
ValueError – If less the 2
VMobjectare passed.
Example
Example: IntersectionExample ¶
from manim import * class IntersectionExample(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 = Intersection(sq, cr, color=GREEN, fill_opacity=1) un.move_to([1.5, 0, 0]) self.add(sq, cr, un)
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.