RightAngle

Qualified name: manim.mobject.geometry.RightAngle

class RightAngle(line1, line2, length=None, **kwargs)[source]

Bases: manim.mobject.geometry.Angle

An elbow-type mobject representing a right angle between two lines.

Parameters
  • line1 (Line) – The first line.

  • line2 (Line) – The second line.

  • length (float) – The length of the arms.

  • **kwargs – Further keyword arguments that are passed to the constructor of Angle.

Examples

Example: RightAngleExample

../_images/RightAngleExample-1.png
from manim import *

class RightAngleExample(Scene):
    def construct(self):
        line1 = Line( LEFT, RIGHT )
        line2 = Line( DOWN, UP )
        rightangles = [
            RightAngle(line1, line2),
            RightAngle(line1, line2, length=0.4, quadrant=(1,-1)),
            RightAngle(line1, line2, length=0.5, quadrant=(-1,1), stroke_width=8),
            RightAngle(line1, line2, length=0.7, quadrant=(-1,-1), color=RED),
        ]
        plots = VGroup()
        for rightangle in rightangles:
            plot=VGroup(line1.copy(),line2.copy(), rightangle)
            plots.add(plot)
        plots.arrange(buff=1.5)
        self.add(plots)

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.