Skip to content

spiral

11 motifs. Import them from geomotif.motifs, or build one by name with registry.create("spiral.archimedean").

spiral.archimedean

spiral.archimedean

The arithmetic spiral r = a + b*theta.

from geomotif import save_svg
from geomotif.motifs import ArchimedeanSpiral

motif = ArchimedeanSpiral()
save_svg(motif.build(), "spiral.archimedean.svg", width=320, height=320)
geomotif render spiral.archimedean --out spiral.archimedean.svg
{
  "geomotif": "1.3.1",
  "motif": "spiral.archimedean",
  "params": {
    "resolution": null,
    "center": [
      0.0,
      0.0
    ],
    "theta_start": 0.0,
    "theta_span": 18.84955592153876,
    "a": 0.0,
    "b": 10.0
  }
}
Parameters
Name Type Default Notes
a float 0.0
b float 10.0
theta_span float 18.84955592153876
center Point (0.0, 0.0)
theta_start 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.

spiral.between

spiral.between

The endpoint-constrained arithmetic spiral: r = a + b*theta.

from geomotif import save_svg
from geomotif.motifs import SpiralBetween

motif = SpiralBetween(start=(100.0, 0.0), end=(10.0, 0.0), turns=2)
save_svg(motif.build(), "spiral.between.svg", width=320, height=320)
geomotif render spiral.between --out spiral.between.svg
{
  "geomotif": "1.3.1",
  "motif": "spiral.between",
  "params": {
    "start": [
      100.0,
      0.0
    ],
    "end": [
      10.0,
      0.0
    ],
    "center": [
      0.0,
      0.0
    ],
    "clockwise": true,
    "turns": 2,
    "resolution": null
  }
}
Parameters
Name Type Default
start Point required
end Point required
center Point (0.0, 0.0)
clockwise bool True
turns int 0
resolution int | None None

spiral.euler

spiral.euler

The clothoid: curvature increasing linearly with distance traveled.

from geomotif import save_svg
from geomotif.motifs import EulerSpiral

motif = EulerSpiral()
save_svg(motif.build(), "spiral.euler.svg", width=320, height=320)
geomotif render spiral.euler --out spiral.euler.svg
{
  "geomotif": "1.3.1",
  "motif": "spiral.euler",
  "params": {
    "resolution": null,
    "scale": 200.0,
    "extent": 2.5,
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default Notes
scale float 200.0
extent float 2.5
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.

spiral.fermat

spiral.fermat

The parabolic spiral r = a * sqrt(theta), both branches.

from geomotif import save_svg
from geomotif.motifs import FermatSpiral

motif = FermatSpiral()
save_svg(motif.build(), "spiral.fermat.svg", width=320, height=320)
geomotif render spiral.fermat --out spiral.fermat.svg
{
  "geomotif": "1.3.1",
  "motif": "spiral.fermat",
  "params": {
    "resolution": null,
    "center": [
      0.0,
      0.0
    ],
    "theta_start": 0.0,
    "theta_span": 18.84955592153876,
    "a": 30.0,
    "both_branches": true
  }
}
Parameters
Name Type Default Notes
a float 30.0
both_branches bool True
theta_span float 18.84955592153876
center Point (0.0, 0.0)
theta_start 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.

spiral.fibonacci

spiral.fibonacci

Quarter circles inscribed in a chain of Fibonacci squares.

from geomotif import save_svg
from geomotif.motifs import FibonacciSpiral

motif = FibonacciSpiral()
save_svg(motif.build(), "spiral.fibonacci.svg", width=320, height=320)
geomotif render spiral.fibonacci --out spiral.fibonacci.svg
{
  "geomotif": "1.3.1",
  "motif": "spiral.fibonacci",
  "params": {
    "quarters": 9,
    "size": 10.0
  }
}
Parameters
Name Type Default
quarters int 9
size float 10.0

spiral.golden

spiral.golden

The logarithmic spiral that widens by the golden ratio each quarter turn.

from geomotif import save_svg
from geomotif.motifs import GoldenSpiral

motif = GoldenSpiral()
save_svg(motif.build(), "spiral.golden.svg", width=320, height=320)
geomotif render spiral.golden --out spiral.golden.svg
{
  "geomotif": "1.3.1",
  "motif": "spiral.golden",
  "params": {
    "resolution": null,
    "center": [
      0.0,
      0.0
    ],
    "theta_start": 0.0,
    "theta_span": 12.566370614359172,
    "a": 2.0
  }
}
Parameters
Name Type Default Notes
a float 2.0
theta_span float 12.566370614359172
center Point (0.0, 0.0)
theta_start 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.

spiral.hyperbolic

spiral.hyperbolic

The reciprocal spiral r = a / theta.

from geomotif import save_svg
from geomotif.motifs import HyperbolicSpiral

motif = HyperbolicSpiral()
save_svg(motif.build(), "spiral.hyperbolic.svg", width=320, height=320)
geomotif render spiral.hyperbolic --out spiral.hyperbolic.svg
{
  "geomotif": "1.3.1",
  "motif": "spiral.hyperbolic",
  "params": {
    "resolution": null,
    "center": [
      0.0,
      0.0
    ],
    "theta_start": 0.5235987755982988,
    "theta_span": 18.84955592153876,
    "a": 200.0
  }
}
Parameters
Name Type Default Notes
a float 200.0
theta_start float 0.5235987755982988
theta_span float 18.84955592153876
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.

spiral.involute

spiral.involute

The path of a string unwinding, taut, from a circle.

from geomotif import save_svg
from geomotif.motifs import CircleInvolute

motif = CircleInvolute()
save_svg(motif.build(), "spiral.involute.svg", width=320, height=320)
geomotif render spiral.involute --out spiral.involute.svg
{
  "geomotif": "1.3.1",
  "motif": "spiral.involute",
  "params": {
    "resolution": null,
    "radius": 10.0,
    "turns": 3.0,
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default Notes
radius float 10.0
turns float 3.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.

spiral.lituus

spiral.lituus

The spiral r = a / sqrt(theta), named for the Roman augur's staff.

from geomotif import save_svg
from geomotif.motifs import Lituus

motif = Lituus()
save_svg(motif.build(), "spiral.lituus.svg", width=320, height=320)
geomotif render spiral.lituus --out spiral.lituus.svg
{
  "geomotif": "1.3.1",
  "motif": "spiral.lituus",
  "params": {
    "resolution": null,
    "center": [
      0.0,
      0.0
    ],
    "theta_start": 0.5235987755982988,
    "theta_span": 18.84955592153876,
    "a": 200.0
  }
}
Parameters
Name Type Default Notes
a float 200.0
theta_start float 0.5235987755982988
theta_span float 18.84955592153876
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.

spiral.logarithmic

spiral.logarithmic

The equiangular spiral r = a * exp(b*theta).

from geomotif import save_svg
from geomotif.motifs import LogarithmicSpiral

motif = LogarithmicSpiral()
save_svg(motif.build(), "spiral.logarithmic.svg", width=320, height=320)
geomotif render spiral.logarithmic --out spiral.logarithmic.svg
{
  "geomotif": "1.3.1",
  "motif": "spiral.logarithmic",
  "params": {
    "resolution": null,
    "center": [
      0.0,
      0.0
    ],
    "theta_start": 0.0,
    "theta_span": 18.84955592153876,
    "a": 5.0,
    "b": 0.15
  }
}
Parameters
Name Type Default Notes
a float 5.0
b float 0.15
theta_span float 18.84955592153876
center Point (0.0, 0.0)
theta_start 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.

spiral.theodorus

spiral.theodorus

The square-root spiral: a chain of right triangles, drawn exactly.

from geomotif import save_svg
from geomotif.motifs import TheodorusSpiral

motif = TheodorusSpiral()
save_svg(motif.build(), "spiral.theodorus.svg", width=320, height=320)
geomotif render spiral.theodorus --out spiral.theodorus.svg
{
  "geomotif": "1.3.1",
  "motif": "spiral.theodorus",
  "params": {
    "triangles": 16,
    "size": 20.0,
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
triangles int 16
size float 20.0
center Point (0.0, 0.0)