Perpendicular¶
Qualified name: manimextra.geometry.Perpendicular
- class manimextra.geometry.Perpendicular(line, dot, length=1.0, rotate=False, **kwargs)¶
Bases:
LineA class to represent a perpendicular line to another line.
- Parameters:
line (Line) – The line to which the perpendicular line is drawn.
dot (Point3DLike) – The point through which the perpendicular line passes.
length (float, optional) – The length of the perpendicular line, by default 1.0.
rotate (bool, optional) – Use if you want the perpendicular to be in the other direction, by default False.
Examples
Example: PerpendicularExample ¶
from manim import * from manimextra import * class PerpendicularExample(Scene): def construct(self): line = Line(2 * LEFT, 2 * RIGHT, color=YELLOW) dot = Dot(RIGHT + UP) perpendicular = Perpendicular(line, dot, color=RED) self.add(line, dot, perpendicular)
Methods
get_anglesget_footget_lineget_vertexAttributes
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.
- _original__init__(line, dot, length=1.0, rotate=False, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.