Advanced Pavilion Design
This example demonstrates a multi-tier pavilion with color coding.
// 1. Configuration
Gear(96)
RI(1.54)
// Use standard Z-axis for 8-fold symmetry
sym = Rotate(Z, 8)
// Define a mirror plane across the Y axis (normal to Y)
// This creates 16-fold symmetry when combined with Rotate(Z,8)
mirror = Mirror(Plane(Y, 0))
// 2. Pavilion (Bottom)
// Pavilion angles are negative
P1 = Plane(Normal(-43.0, 0), 5) |> sym
P1 = P1 { color: "blue", notes: "Main Facets" }
// Tier 2: Star Facets
P2 = Plane(Normal(-41.0, 6), 5) |> sym
P2 = P2 { color: "cyan" }
// Tier 3: Lower Girdle
P3 = Plane(Normal(-44.0, 3), 5) |> sym * mirror
P3 = P3 { color: "navy" }
// 3. Crown (Top)
// Crown angles are positive
crown = Plane(Normal(35.0, 0), 5) |> sym
// 4. Table
table = Plane(Z, 6.0) // Flat top at height 6
// 5. Assembly
pavilion = P1 + P2 + P3
stone := pavilion + crown + table
Using Attributes
You can attach attributes to any geometry variable.
// Create P1 first (as above)
P1 = Plane(Normal(-43.0, 0), 5) |> sym
// Attach color
P1 = P1 { color: "blue" }