freneticlib.utils.catmull
Module Contents
Classes
Generate random roads given the configuration parameters |
Functions
|
p0, p1, p2, and p3 should be (x,y) point pairs that define the Catmull-Rom spline. |
|
Calculate Catmull-Rom for a chain of points and return the combined curve. |
|
|
|
Attributes
- freneticlib.utils.catmull.catmull_rom_spline(p0, p1, p2, p3, num_points=20)[source]
p0, p1, p2, and p3 should be (x,y) point pairs that define the Catmull-Rom spline. num_points is the number of points to include in this curve segment.
- freneticlib.utils.catmull.catmull_rom_chain(points: List[Tuple], num_spline_points=20) List[source]
Calculate Catmull-Rom for a chain of points and return the combined curve.
- freneticlib.utils.catmull.catmull_rom(points: List[Tuple], num_spline_points=20) List[Tuple][source]
- freneticlib.utils.catmull.Tuple2F
- class freneticlib.utils.catmull.ControlNodesGenerator(num_control_nodes: int = 15, max_angle: int = None, seg_length=None, num_spline_nodes: int = None, initial_node: Tuple2F = (10.0, 0.0))[source]
Generate random roads given the configuration parameters
- NUM_INITIAL_SEGMENTS_THRESHOLD = 2
- NUM_UNDO_ATTEMPTS = 20