Browse Source

Add hollow helix example

main
raffitz 3 years ago
parent
commit
d3a7ea6186
Signed by: raffitz
GPG Key ID: BB3596BD0A31252D
  1. 1
      README.md
  2. 4
      examples/helix1.solid
  3. 20
      examples/hhelix1.solid

1
README.md

@ -46,6 +46,7 @@ The output consists of a series of images, each depicting a layer of the solid, @@ -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 |

4
examples/helix1.solid

@ -3,8 +3,8 @@ @@ -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 \

20
examples/hhelix1.solid

@ -0,0 +1,20 @@ @@ -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}
Loading…
Cancel
Save