diff --git a/README.md b/README.md index d4e7007..aad084e 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,8 @@ The output consists of a series of images, each depicting a layer of the solid, | --- | --- | --- | | `cube.solid` | Cube | A cube stood on its vertex | | `hcube.solid` | Hollow Cube | A hollow cube stood on its vertex | +| `tetrahedron1.solid` | Tetrahedron | A tetrahedron stood on its edge | +| `htetra1.solid` | Hollow Teterahedron | A hollow tetrahedron stood on its edge | | `sphere.solid` | Sphere | A sphere of radius s | | `torus1.solid` | Torus | A torus with a tube radius of s, and a hole radius of 2 * s | | `ramp.solid` | Ramp | A spiraling ramp | diff --git a/examples/htetra1.solid b/examples/htetra1.solid new file mode 100644 index 0000000..81c9735 --- /dev/null +++ b/examples/htetra1.solid @@ -0,0 +1,16 @@ +# Hollow Tetrahedron + +define @ns s - 2 + +-s < x < s +-s < y < s +-s < z < s + +{(x - s) + (y - s) - (z - s) < 0 ∧ \ +(x - s) - (y + s) + (z + s) < 0 ∧ \ +-(x + s) + (y - s) + (z + s) < 0 ∧ \ +-(x + s) - (y + s) - (z - s) < 0} ⊻ \ +{(x - @ns) + (y - @ns) - (z - @ns) < 0 ∧ \ +(x - @ns) - (y + @ns) + (z + @ns) < 0 ∧ \ +-(x + @ns) + (y - @ns) + (z + @ns) < 0 ∧ \ +-(x + @ns) - (y + @ns) - (z - @ns) < 0} diff --git a/examples/tetrahedron1.solid b/examples/tetrahedron1.solid new file mode 100644 index 0000000..afab345 --- /dev/null +++ b/examples/tetrahedron1.solid @@ -0,0 +1,10 @@ +# Tetrahedron + +-s < x < s +-s < y < s +-s < z < s + +(x - s) + (y - s) - (z - s) < 0 +(x - s) - (y + s) + (z + s) < 0 +-(x + s) + (y - s) + (z + s) < 0 +-(x + s) - (y + s) - (z - s) < 0