Skip to content

mandala

5 motifs. Import them from geomotif.motifs, or build one by name with registry.create("kaleidoscope").

kaleidoscope

kaleidoscope

One motif, repeated under a cyclic or dihedral symmetry group.

from geomotif import save_svg
from geomotif.core import registry

# This motif's example takes values that are themselves objects, so it
# reads better through the registry than as a constructor call.
motif = registry.create("kaleidoscope", **registry.describe("kaleidoscope").example)
save_svg(motif.build(), "kaleidoscope.svg", width=320, height=320)
geomotif render kaleidoscope --out kaleidoscope.svg
{
  "geomotif": "1.3.1",
  "motif": "kaleidoscope",
  "params": {
    "unit": {
      "motif": "rose",
      "params": {
        "resolution": null,
        "n": 5,
        "d": 2,
        "size": 150.0,
        "center": [
          0.0,
          0.0
        ]
      }
    },
    "group": "C5",
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
unit SupportsBuild required
group str 'D6'
center Point (0.0, 0.0)

layered-rings

layered-rings

Concentric circles: the other half of a mandala's scaffolding.

from geomotif import save_svg
from geomotif.compose import LayeredRings

motif = LayeredRings()
save_svg(motif.build(), "layered-rings.svg", width=320, height=320)
geomotif render layered-rings --out layered-rings.svg
{
  "geomotif": "1.3.1",
  "motif": "layered-rings",
  "params": {
    "count": 7,
    "inner": 24.0,
    "step": 20.0,
    "growth": 1.0,
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
count int 7
inner float 24.0
step float 20.0
growth float 1.0
center Point (0.0, 0.0)

mandala

mandala

Concentric rings of repeated motifs.

from geomotif import save_svg
from geomotif.core import registry

# This motif's example takes values that are themselves objects, so it
# reads better through the registry than as a constructor call.
motif = registry.create("mandala", **registry.describe("mandala").example)
save_svg(motif.build(), "mandala.svg", width=320, height=320)
geomotif render mandala --out mandala.svg
{
  "geomotif": "1.3.1",
  "motif": "mandala",
  "params": {
    "rings": [
      {
        "$type": "geomotif.compose.mandala.Ring",
        "unit": {
          "motif": "rose",
          "params": {
            "resolution": null,
            "n": 6,
            "d": 1,
            "size": 76.0,
            "center": [
              0.0,
              0.0
            ]
          }
        },
        "count": 1,
        "radius": 0.0,
        "phase": 0.0,
        "spin": 0.0,
        "face": true,
        "mirror": false
      },
      {
        "$type": "geomotif.compose.mandala.Ring",
        "unit": {
          "motif": "ellipse",
          "params": {
            "resolution": null,
            "rx": 27.0,
            "ry": 11.0,
            "center": [
              0.0,
              0.0
            ],
            "rotation": 0.0
          }
        },
        "count": 12,
        "radius": 74.0,
        "phase": 0.0,
        "spin": 0.0,
        "face": true,
        "mirror": false
      },
      {
        "$type": "geomotif.compose.mandala.Ring",
        "unit": {
          "motif": "polygon.regular",
          "params": {
            "sides": 3,
            "radius": 17.0,
            "center": [
              0.0,
              0.0
            ],
            "rotation": 1.5707963267948966
          }
        },
        "count": 24,
        "radius": 128.0,
        "phase": 0.0,
        "spin": 0.0,
        "face": true,
        "mirror": false
      }
    ],
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
rings tuple[Ring, ...] required
center Point (0.0, 0.0)

snowflake

snowflake

Six identical arms, each mirrored in its own axis.

from geomotif import save_svg
from geomotif.compose import Snowflake

motif = Snowflake()
save_svg(motif.build(), "snowflake.svg", width=320, height=320)
geomotif render snowflake --out snowflake.svg
{
  "geomotif": "1.3.1",
  "motif": "snowflake",
  "params": {
    "unit": null,
    "size": 150.0,
    "branches": 4,
    "depth": 2,
    "seed": 0,
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
unit SupportsBuild | None None
size float 150.0
branches int 4
depth int 2
seed int 0
center Point (0.0, 0.0)

spoke-pattern

spoke-pattern

Radial lines from an inner circle to an outer one.

from geomotif import save_svg
from geomotif.compose import SpokePattern

motif = SpokePattern()
save_svg(motif.build(), "spoke-pattern.svg", width=320, height=320)
geomotif render spoke-pattern --out spoke-pattern.svg
{
  "geomotif": "1.3.1",
  "motif": "spoke-pattern",
  "params": {
    "count": 24,
    "inner": 40.0,
    "outer": 140.0,
    "stagger": 0.0,
    "rotation": 0.0,
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
count int 24
inner float 40.0
outer float 140.0
stagger float 0.0
rotation float 0.0
center Point (0.0, 0.0)