From d3a7ea61867fb11ab6a50bf3f8b39d3e20c44adf Mon Sep 17 00:00:00 2001 From: raffitz Date: Sun, 28 Mar 2021 12:36:53 +0100 Subject: [PATCH] Add hollow helix example --- README.md | 1 + examples/helix1.solid | 4 ++-- examples/hhelix1.solid | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 examples/hhelix1.solid diff --git a/README.md b/README.md index 6f641f6..e8516f2 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ The output consists of a series of images, each depicting a layer of the solid, | `torus1.solid` | Torus | A torus with a tube radius of s, and a hole radius of 2 * s | | `ramp.solid` | Ramp | A spiraling ramp | | `helix1.solid` | Helix | A helix | +| `hhelix1.solid` | Hollow Helix | A hollow helix | | `rotating_triangle_torus.solid` | RTT | A triangle rotating 2π around the z axis | | `hollow_rtt.solid` | RTT | A hollow triangle rotating 2π around the z axis | | `rotating_triangle_torus2.solid` | RTT | A triangle rotating 4π around the z axis | diff --git a/examples/helix1.solid b/examples/helix1.solid index 664bba1..3d9d9f3 100644 --- a/examples/helix1.solid +++ b/examples/helix1.solid @@ -3,8 +3,8 @@ define @b (3 * s) / 2 define @a @b / π --5*s <= x <= 5*s --5*s <= y <= 5*s +-4*s <= x <= 4*s +-4*s <= y <= 4*s -s <= z <= 2*s (ρ - 3*s)^2 + (z - @b - (@a * φ))^2 <= s^2 \ diff --git a/examples/hhelix1.solid b/examples/hhelix1.solid new file mode 100644 index 0000000..4618991 --- /dev/null +++ b/examples/hhelix1.solid @@ -0,0 +1,20 @@ +# Helix with radius s, inner radius 2s + +define @b (3 * s) / 2 +define @a @b / π + +-4*s <= x <= 4*s +-4*s <= y <= 4*s +-s <= z <= 2*s + +{(ρ - 3*s)^2 + (z - @b - (@a * φ))^2 <= s^2 \ +∨ \ +(ρ - 3*s)^2 + (z - 3*s - @b - (@a * φ))^2 <= s^2 \ +∨ \ +(ρ - 3*s)^2 + (z + 3*s - @b - (@a * φ))^2 <= s^2} \ +⊻ \ +{(ρ - 3*s)^2 + (z - @b - (@a * φ))^2 <= (s-1)^2 \ +∨ \ +(ρ - 3*s)^2 + (z - 3*s - @b - (@a * φ))^2 <= (s-1)^2 \ +∨ \ +(ρ - 3*s)^2 + (z + 3*s - @b - (@a * φ))^2 <= (s-1)^2}