pythagoras.r3.curve module¶
- class pythagoras.r3.curve.Trajectory(phi: Callable[[float], tuple[float, float, float]], a: float, b: float, dt: float = 0, zord: int = 0)[source]¶
Bases:
PObject3DCurve in \(\mathbf R^3\) traced by a single-variable parametric function.
- Variables:
phi (collections.abc.Callable[[float], tuple[float, float, float]]) – The function which determines the shape.
a (float) – Start of the time domain.
b (float) – End of the time domain.
dt (float) – Increment in time between each point. If it is less than or equal to zero, the time domain will be split into 100 intervals.
- a: float¶
- b: float¶
- dt: float¶
- make_points() list[tuple[float, float, float]][source]¶
Compute the positions of each of the samples of the curve.
- Returns:
List containing the sampled points.
- phi: Callable[[float], tuple[float, float, float]]¶
- svg(camera: Camera3D, frustum: float, width: float, height: float, scale: float, lights: list[tuple[tuple[float, float, float], float]], *args: POProperty) str[source]¶
Compiles the 3D object into SVG commands.
- Returns:
The corresponding SVG code.
- tikz(camera: Camera3D, frustum: float, lights: list[tuple[tuple[float, float, float], float]], *args: POProperty) str[source]¶
Compiles the 3D object into a sequence of TikZ instructions.
- Returns:
The resulting TikZ code.