Returns informative shape annotations. Good for debugging and general info displaying.
Constructs an arc from a circle with the given radius, and number of segments. Arc goes from start_angle to end_angle, both of which are in radians.
- segmentation_mode : ‘2PI’ or ‘arc’. The first segments
the whole circle into the given number of segments, the second segments the arc.
Constructs an arc from an ellipse with the given width, height, and number of segments. Arc goes from start_angle to end_angle, both of which are in radians.
- segmentation_mode : ‘2PI’ or ‘arc’. The first segments
the whole ellipse into the given number of segments, the second segments the arc.
Returns an arrow shape.
Returns a Path with bezier interpolation between the given points. The interpolation is computed so that the resulting path touches the given points.
points the key points from which to interpolate.
curvature the smoothness of the curve [0, 1].
per segment.
Draws a cross shape.
A donut (ellipse within ellipse) with a width, height, inset, segments.
segments is how many lines should be used to draw ellipse. More segments create a smoother ellipse, but will take longer to draw.
inset is the distance to inset the inner ellipse from the outer.
The donut is drawn with the current pen location as the center. offset may be used to shift this around, for example, to draw from the lower, left corner.
A Fan is a slice of a donut seen from above (when you can see the hole in the middle).
All angles are assumed to be in radians.
A frame (rectangle within a rectangle) with a width, height, and inset.
Rectangular grid.
Returns a path with linearly interpolated segments. Visually the result is the same as a plain path, but this is useful as an intermediate step in constructing more interesting shapes by deforming this one.
coords is a CoordinateArray.
Think of it as the sampling period in digital recording. If interpolation_unit > coord[i] - coord[i-1], the coord[i] - coord[i-1] segment is not further segmented.
A measuring ruler.
to larger. e.g., (10, 20, 40).
The hight of the other units are multiples of this.
the invisible center-line.
Constructs an Archimedean (arithmetic) spiral with the given number of turns using the specified number of points.
wrapping_constant controls how tightly the spiral is wound. Several classic spirals can be created using different wrapping_constants:
lituus: -2 hyperbolic spiral: -1 Archimedes’ spiral: 1 Fermat’s spiral: 2
scaler controls how large the spiral is.
The general Archimedean spiral equation is:
r = a * theta^(1/n)
where r is the radius, a is the scaler, and n is the wrapping_constant.
More info: http://mathworld.wolfram.com/ArchimedeanSpiral.html
Constructs an logarithmic spiral with the given number of turns using the specified number of points.
expansion_rate controls how large the spiral is for a given number of turns. Very small numbers will result in tightly-wound spirals. Large numbers will give spirals with giant “tails”. Typical values range from 0.1 to 0.3
The logarithmic spiral equation is:
r = e^(bt)
where r is the radius, e is e, b is the expansion rate, and t is theta
Draws a star with criscrossing lines.
jump_size determines how many points to skip between connected points. an illegal jump size (one that does not result in a valid crisscross star) is ignored and replaced with a dot in the center of the star.
Supershape, generated using the superformula first proposed by Johan Gielis.
points_count is the total number of points to compute.
3.1416 * 2 is a complete cycle.
Distort shape by adding noise.
noise for the x and y coordinates.
In place offsetting.
Displaces a path along its perpendiculars.
Precondition: len(path) == len(displacement)
Distort shape by adding noise perpendiculary to the path. This is an in-place destructive transformation; no new shapes are created.
shape is the shape to be noisified.
for displacement.
In place rotation.
In place scaling.