Expand description
Generate Spirograph-like paths.
Modules§
- program
- Functions for implementing the executable spiropath program.
Structs§
- Contact
Point - A point along a polyline where it is in contact with another.
- Options
- Options for controlling a spiropath.
- Path
State - The state we maintain for one of the paths.
Enums§
- Location
- Location of the rotating shape relative to the stationary shape.
- Orientation
- How to interpret 180 degree bends.
- Scale
- How to scale an axis of the output.
Functions§
- direction
- Return the direction (length 1) vector between two points (as a point).
- directions_
bends - Return the bending angle at each point along a polyline.
- find_
top_ most_ point_ index - Find the index of the top-most point of a polyline (after rotating by an angle).
- is_
clockwise - Test whether a pre-processed polyline has a clockwise orientation.
- load_
polyline_ from_ svg_ file - Load a polyline from a file and convert it to a polyline.
- maximal_
coordinates - Return the maximal coordinates in some polylines.
- minimal_
coordinates - Return the minimal coordinates in some polylines.
- orient_
angle - Orient a 180 degree turn.
- points_
distance - Return the distance between two points.
- polyline_
directions - Return the direction of the polyline at each of its points.
- polyline_
lengths - Measure the lengths of each of the segments of the polyline.
- print_
svg_ polylines - Print a vector of polylines as an SVG file.
- prune_
repeated_ points - round_
lengths - Round lengths to integers.
- scale_
lengths - Scale a polyline by a factor.
- scale_
point - Scale a point by a factor.
- scale_
polyline - Scale a polyline by a factor.
- spiropath
- Generate spiropath(s) by rotating one shape around another.
- spiropath_
polyline - Compute the polyline of the traced point as we rotate one polyline around another.
- transform
- Scale and move the points to fit in a (0,0) -> (w,h) bounding box.