|
The pentagram owes its creation to the same rotation used in
the other creations. What has to be computed is based on the number
of vertexes the final star has to have. Two angles are
critical. The pentagram is constructed from a "V" placed
and rotated to create the 5 pointed star. Some legs of the
"V" overlap others, this is fine for the finished product.
360 divided by 5 gives us a rotation factor of 72 degrees. The
"V" angle is exactly 1/2 of that or 36.
The code for this is as follows:
// Declare "V" portion
#declare Penta1=union{
box{<-.1,0,-3><.1,0.001,0> rotate<0,18,0> translate<0,0,1.5>}
box{<-.1,0,-3><.1,0.001,0> rotate<0,-18,0> translate<0,0,1.5>}
}
// The outside cylinders
#declare Rim=union{
difference{
cylinder{<0,0,0><0,.001,0> 1.7}
cylinder{<0,-.1,0><0,.002,0> 1.5}
}
difference{
cylinder{<0,0,0><0,.001,0> 1.75}
cylinder{<0,-.1,0><0,.002,0> 1.7}
texture{T_Stone21 scale .25}
}
difference{
cylinder{<0,0,0><0,.001,0> 1.5}
cylinder{<0,-.1,0><0,.002,0> 1.45}
texture{T_Stone21 scale .25}
}
}
// Put it all together
#declare Pentagram=union{
object{Penta1 rotate<0,0,0>}
object{Penta1 rotate<0,-72,0>}
object{Penta1 rotate<0,-144,0>}
object{Rim}
texture{T_Stone18 scale .25}
}
|