Intersection

Qualified name: manim.mobject.boolean\_ops.Intersection

class Intersection(*vmobjects, **kwargs)[source]

Bases: manim.mobject.boolean_ops._BooleanOps

Find the intersection of two VMobject s. This keeps the parts covered by both VMobject s.

Parameters

vmobjects – The VMobject to find the intersection.

Raises

ValueError – If less the 2 VMobject are passed.

Return type

None

Example

Example: IntersectionExample

../_images/IntersectionExample-2.png
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

animate

Used to animate the application of a method.

animation_overrides

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.