primitive¶
16 motifs. Import them from geomotif.motifs, or build one by name
with registry.create("arc").
arc¶
Part of a circle: sweep radians of it, starting at start_angle.
Parameters
| Name | Type | Default | Notes |
|---|---|---|---|
radius |
float |
100.0 |
|
start_angle |
float |
0.0 |
|
sweep |
float |
3.141592653589793 |
|
center |
Point |
(0.0, 0.0) |
|
resolution |
int | None |
None |
Segments per strand -- a strand gets one more point than that, so both ends are included. None (default) scales density with the winding. |
circle¶
A circle of radius radius around center.
Parameters
| Name | Type | Default | Notes |
|---|---|---|---|
radius |
float |
100.0 |
|
center |
Point |
(0.0, 0.0) |
|
resolution |
int | None |
None |
Segments per strand -- a strand gets one more point than that, so both ends are included. None (default) scales density with the winding. |
egg¶
An oval fatter at one end than the other.
Parameters
| Name | Type | Default | Notes |
|---|---|---|---|
length |
float |
140.0 |
|
width |
float |
100.0 |
|
taper |
float |
0.25 |
|
center |
Point |
(0.0, 0.0) |
|
resolution |
int | None |
None |
Segments per strand -- a strand gets one more point than that, so both ends are included. None (default) scales density with the winding. |
ellipse¶
An ellipse with semi-axes rx and ry, optionally rotated.
Parameters
| Name | Type | Default | Notes |
|---|---|---|---|
rx |
float |
120.0 |
|
ry |
float |
70.0 |
|
center |
Point |
(0.0, 0.0) |
|
rotation |
float |
0.0 |
|
resolution |
int | None |
None |
Segments per strand -- a strand gets one more point than that, so both ends are included. None (default) scales density with the winding. |
line¶
A straight segment from start to end.
Parameters
| Name | Type | Default |
|---|---|---|
start |
Point |
(0.0, 0.0) |
end |
Point |
(100.0, 100.0) |
points.grid¶
A rectangular lattice of loose points, optionally staggered.
Parameters
| Name | Type | Default |
|---|---|---|
columns |
int |
12 |
rows |
int |
12 |
dx |
float |
20.0 |
dy |
float |
20.0 |
stagger |
float |
0.0 |
center |
Point |
(0.0, 0.0) |
points.poisson¶
Points scattered at random, but never closer together than a set distance.
Parameters
| Name | Type | Default |
|---|---|---|
width |
float |
300.0 |
height |
float |
300.0 |
min_distance |
float |
20.0 |
seed |
int |
0 |
attempts |
int |
30 |
center |
Point |
(0.0, 0.0) |
polygon.regular¶
A regular sides-gon inscribed in a circle of radius radius.
Parameters
| Name | Type | Default |
|---|---|---|
sides |
int |
6 |
radius |
float |
100.0 |
center |
Point |
(0.0, 0.0) |
rotation |
float |
1.5707963267948966 |
polygon.reuleaux¶
A curve of constant width: the Reuleaux triangle and its odd-sided kin.
Parameters
| Name | Type | Default |
|---|---|---|
sides |
int |
3 |
width |
float |
150.0 |
center |
Point |
(0.0, 0.0) |
rotation |
float |
1.5707963267948966 |
polygon.star¶
The {n/k} star polygon: every step-th corner of an n-gon.
Parameters
| Name | Type | Default |
|---|---|---|
points |
int |
5 |
step |
int |
2 |
radius |
float |
100.0 |
center |
Point |
(0.0, 0.0) |
rotation |
float |
1.5707963267948966 |
rectangle¶
An axis-aligned rectangle centered on center.
Parameters
| Name | Type | Default |
|---|---|---|
width |
float |
160.0 |
height |
float |
100.0 |
center |
Point |
(0.0, 0.0) |
rectangle.rounded¶
A rectangle with its corners replaced by quarter circles.
Parameters
| Name | Type | Default |
|---|---|---|
width |
float |
160.0 |
height |
float |
100.0 |
corner_radius |
float |
20.0 |
center |
Point |
(0.0, 0.0) |
sector¶
A pie slice: an arc closed back to its center by two radii.
Parameters
| Name | Type | Default |
|---|---|---|
radius |
float |
100.0 |
start_angle |
float |
0.0 |
sweep |
float |
1.0471975511965976 |
center |
Point |
(0.0, 0.0) |
squircle¶
The square-circle midpoint: a Superellipse with n = 4.
Parameters
| Name | Type | Default | Notes |
|---|---|---|---|
radius |
float |
100.0 |
|
center |
Point |
(0.0, 0.0) |
|
resolution |
int | None |
None |
Segments per strand -- a strand gets one more point than that, so both ends are included. None (default) scales density with the winding. |
star¶
The star people actually draw: outer points joined through inner ones.
Parameters
| Name | Type | Default |
|---|---|---|
points |
int |
5 |
inner_ratio |
float |
0.382 |
radius |
float |
100.0 |
center |
Point |
(0.0, 0.0) |
rotation |
float |
1.5707963267948966 |
superellipse¶
The curve |x/rx|**n + |y/ry|**n == 1, for any positive n.
Parameters
| Name | Type | Default | Notes |
|---|---|---|---|
exponent |
float |
2.5 |
|
rx |
float |
100.0 |
|
ry |
float |
100.0 |
|
center |
Point |
(0.0, 0.0) |
|
resolution |
int | None |
None |
Segments per strand -- a strand gets one more point than that, so both ends are included. None (default) scales density with the winding. |