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),
        ]
        line_list = VGroup( *[VGroup() for k in range(4)] )
        for k in range(4):
            linea = line1.copy()
            lineb = line2.copy()
            line_list[k].add( linea )
            line_list[k].add( lineb )
            line_list[k].add( rightangles[k] )
        line_list.arrange_in_grid(buff=1.5)
        self.add(
            line_list
        )

Methods

Attributes

animate

Used to animate the application of a method.

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.