Segment
Module: terminaltexteffects.engine.motion
A segment of a path consisting of two waypoints and the distance between them.
Attributes:
Name | Type | Description |
---|---|---|
start |
Waypoint
|
start waypoint |
end |
Waypoint
|
end waypoint |
distance |
float
|
distance between the start and end waypoints |
Methods:
Name | Description |
---|---|
get_coord_on_segment |
float) -> Coord: Returns the coordinate at the given distance along the segment. |
Source code in terminaltexteffects/engine/motion.py
get_coord_on_segment(distance_factor)
Returns the coordinate at the given distance along the segment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
distance_factor |
float
|
distance factor |
required |
Returns:
Name | Type | Description |
---|---|---|
Coord |
Coord
|
Coordinate at the given distance. |