Line¶
- class Line(start_point: Point, end_point: Point, plane: PolarPlane, using_geodesic: bool = True, **kwargs)[source]¶
A geodesic line segment between two
Point
objects.Examples
Example: LineExample ¶
from manim import * from hmanim.native import Line, Point class LineExample(Scene): def construct(self): # The plane that all our hyperbolic objects live in. plane = PolarPlane(size=5) self.add(plane) line = Line( Point(3, 0), Point(3, TAU / 8), plane=plane, color=YELLOW, ) self.add(line)
from hmanim.native import Line, Point class LineExample(Scene): def construct(self): # The plane that all our hyperbolic objects live in. plane = PolarPlane(size=5) self.add(plane) line = Line( Point(3, 0), Point(3, TAU / 8), plane=plane, color=YELLOW, ) self.add(line)
- copy() Line [source]¶
Create and return an identical copy of the
Mobject
including allsubmobjects
.- Returns:
The copy.
- Return type:
Mobject
Note
The clone is initially not visible in the Scene, even if the original was.
- move_to(start_point: Point, end_point: Point) Line [source]¶
Move center of the
Mobject
to certain Point3D.
- rotated_by(angle: float) Line [source]¶
Rotate the polygonal chain around the origin by a given angle in radians.
- Parameters:
angle (float) – The angle to rotate by.
- Returns:
The rotated polygonal chain.
- Return type: