Skip to content

solid

7 motifs. Import them from geomotif.motifs, or build one by name with registry.create("solid.cube").

solid.cube

solid.cube

Six squares. Dual to the octahedron, and the one everybody can check.

from geomotif import save_svg
from geomotif.motifs import Cube

motif = Cube()
save_svg(motif.build(), "solid.cube.svg", width=320, height=320)
geomotif render solid.cube --out solid.cube.svg
{
  "geomotif": "1.3.1",
  "motif": "solid.cube",
  "params": {
    "merge": false,
    "show_nodes": false,
    "size": 200.0,
    "projection": {
      "$type": "geomotif.motifs.solids.Projection",
      "kind": "isometric",
      "yaw": 0.0,
      "pitch": 0.0,
      "roll": 0.0,
      "distance": 3.0
    },
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
size float 200.0
projection Projection a Projection
center Point (0.0, 0.0)
merge bool False
show_nodes bool False

solid.dodecahedron

solid.dodecahedron

Twelve pentagons, built on a cube and the golden ratio.

from geomotif import save_svg
from geomotif.motifs import Dodecahedron

motif = Dodecahedron()
save_svg(motif.build(), "solid.dodecahedron.svg", width=320, height=320)
geomotif render solid.dodecahedron --out solid.dodecahedron.svg
{
  "geomotif": "1.3.1",
  "motif": "solid.dodecahedron",
  "params": {
    "merge": false,
    "show_nodes": false,
    "size": 200.0,
    "projection": {
      "$type": "geomotif.motifs.solids.Projection",
      "kind": "isometric",
      "yaw": 0.0,
      "pitch": 0.0,
      "roll": 0.0,
      "distance": 3.0
    },
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
size float 200.0
projection Projection a Projection
center Point (0.0, 0.0)
merge bool False
show_nodes bool False

solid.icosahedron

solid.icosahedron

Twenty triangles: three golden rectangles at right angles to each other.

from geomotif import save_svg
from geomotif.motifs import Icosahedron

motif = Icosahedron()
save_svg(motif.build(), "solid.icosahedron.svg", width=320, height=320)
geomotif render solid.icosahedron --out solid.icosahedron.svg
{
  "geomotif": "1.3.1",
  "motif": "solid.icosahedron",
  "params": {
    "merge": false,
    "show_nodes": false,
    "size": 200.0,
    "projection": {
      "$type": "geomotif.motifs.solids.Projection",
      "kind": "isometric",
      "yaw": 0.0,
      "pitch": 0.0,
      "roll": 0.0,
      "distance": 3.0
    },
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
size float 200.0
projection Projection a Projection
center Point (0.0, 0.0)
merge bool False
show_nodes bool False

solid.octahedron

solid.octahedron

Eight triangles: a corner of the cube's every face, joined up.

from geomotif import save_svg
from geomotif.motifs import Octahedron

motif = Octahedron()
save_svg(motif.build(), "solid.octahedron.svg", width=320, height=320)
geomotif render solid.octahedron --out solid.octahedron.svg
{
  "geomotif": "1.3.1",
  "motif": "solid.octahedron",
  "params": {
    "merge": false,
    "show_nodes": false,
    "size": 200.0,
    "projection": {
      "$type": "geomotif.motifs.solids.Projection",
      "kind": "isometric",
      "yaw": 0.0,
      "pitch": 0.0,
      "roll": 0.0,
      "distance": 3.0
    },
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
size float 200.0
projection Projection a Projection
center Point (0.0, 0.0)
merge bool False
show_nodes bool False

solid.polyhedron

solid.polyhedron

Any solid you like: your corners, your edges.

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("solid.polyhedron", **registry.describe("solid.polyhedron").example)
save_svg(motif.build(), "solid.polyhedron.svg", width=320, height=320)
geomotif render solid.polyhedron --out solid.polyhedron.svg
{
  "geomotif": "1.3.1",
  "motif": "solid.polyhedron",
  "params": {
    "merge": false,
    "show_nodes": false,
    "size": 200.0,
    "projection": {
      "$type": "geomotif.motifs.solids.Projection",
      "kind": "isometric",
      "yaw": 0.0,
      "pitch": 0.0,
      "roll": 0.0,
      "distance": 3.0
    },
    "center": [
      0.0,
      0.0
    ],
    "corners": [
      [
        1.0,
        0.0,
        -0.5
      ],
      [
        0.0,
        1.0,
        -0.5
      ],
      [
        -1.0,
        0.0,
        -0.5
      ],
      [
        0.0,
        -1.0,
        -0.5
      ],
      [
        0.0,
        0.0,
        1.1
      ]
    ],
    "links": [
      [
        0,
        1
      ],
      [
        1,
        2
      ],
      [
        2,
        3
      ],
      [
        3,
        0
      ],
      [
        0,
        4
      ],
      [
        1,
        4
      ],
      [
        2,
        4
      ],
      [
        3,
        4
      ]
    ]
  }
}
Parameters
Name Type Default
corners tuple[Vertex, ...] required
links tuple[tuple[int, int], ...] ()
size float 200.0
projection Projection a Projection
center Point (0.0, 0.0)
merge bool False
show_nodes bool False

solid.tetrahedron

solid.tetrahedron

Four triangles: the simplest solid there is, and its own dual.

from geomotif import save_svg
from geomotif.motifs import Tetrahedron

motif = Tetrahedron()
save_svg(motif.build(), "solid.tetrahedron.svg", width=320, height=320)
geomotif render solid.tetrahedron --out solid.tetrahedron.svg
{
  "geomotif": "1.3.1",
  "motif": "solid.tetrahedron",
  "params": {
    "merge": false,
    "show_nodes": false,
    "size": 200.0,
    "projection": {
      "$type": "geomotif.motifs.solids.Projection",
      "kind": "isometric",
      "yaw": 0.0,
      "pitch": 0.0,
      "roll": 0.0,
      "distance": 3.0
    },
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
size float 200.0
projection Projection a Projection
center Point (0.0, 0.0)
merge bool False
show_nodes bool False

solid.truncated-icosahedron

solid.truncated-icosahedron

The football: twelve pentagons and twenty hexagons.

from geomotif import save_svg
from geomotif.motifs import TruncatedIcosahedron

motif = TruncatedIcosahedron()
save_svg(motif.build(), "solid.truncated-icosahedron.svg", width=320, height=320)
geomotif render solid.truncated-icosahedron --out solid.truncated-icosahedron.svg
{
  "geomotif": "1.3.1",
  "motif": "solid.truncated-icosahedron",
  "params": {
    "merge": false,
    "show_nodes": false,
    "size": 200.0,
    "projection": {
      "$type": "geomotif.motifs.solids.Projection",
      "kind": "isometric",
      "yaw": 0.0,
      "pitch": 0.0,
      "roll": 0.0,
      "distance": 3.0
    },
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
size float 200.0
projection Projection a Projection
center Point (0.0, 0.0)
merge bool False
show_nodes bool False