Dodecahedric Nexorade
Setup
φ = (sqrt(5)-1)/2
O = ( 0, 0, 0)
V0 = ( φ, φ, φ)
V1 = ( 0, 1,φ^2)
ϕ = Slider(4°,86°,1°, 1, 240, true, true, false)
lineA = Rotate(Line(V1, V0), ϕ, Line(O,Midpoint(V1,V0)))
lineC = Rotate(lineA, 240°, Line(O,V0))
perpCA= PerpendicularLine(lineC, lineA)
A1 = Intersect(perpCA,lineA)
A2 = Reflect(A1, Midpoint(V1,V0))
len = Distance(A1,A2)
ecc = Distance(lineA,lineC)
fact= (len+0.7*ecc)/len
A1d = Dilate(A1, fact, Midpoint(V1,V0))
A2d = Dilate(A2, fact, Midpoint(V1,V0))
nexor1 = Cylinder(A1d, A2d, ecc/2)
nexor2 = Rotate(nexor1,120°, Line(O,V0))
nexor3 = Rotate(nexor1,240°, Line(O,V0))
nexor4 = Rotate(nexor3, 72°, Line(O,(φ,1,0)))
nexor5 = Rotate(nexor1, 72°, Line(O,(0,φ,1)))
nexor6 = Rotate(nexor2, 72°, Line(O,(1,0,φ)))
Lnexor1 = Zip(Rotate(nexor1,k*72°,Line(O,( 0,-φ, 1))),k,0..4)
Lnexor2 = Zip(Rotate(nexor2,k*72°,Line(O,( 1, 0,-φ))),k,0..4)
Lnexor3 = Zip(Rotate(nexor3,k*72°,Line(O,(-φ, 1, 0))),k,0..4)
Lnexor4 = Zip(Rotate(nexor4,k*72°,Line(O,( 0, φ, 1))),k,0..4)
Lnexor5 = Zip(Rotate(nexor5,k*72°,Line(O,( 1, 0, φ))),k,0..4)
Lnexor6 = Zip(Rotate(nexor6,k*72°,Line(O,( φ, 1, 0))),k,0..4)
On = true
#------------------------
# Settings
#------------------------
SetCoords(ϕ, 140, 50)
SetColor(ϕ,"Black")
SetValue(ϕ,32°)
SetActiveView(-1)
SetBackgroundColor("Black")
Q=UnicodeToLetter(34)
List={"Red","Green","Blue","Cyan","Magenta","Yellow"}
Execute(Zip("SetColor(Lnexor"+k+"1,"+Q+txt+Q+")",k,1..6, txt,List))
Execute(Zip("SetFilling(Lnexor"+k+",1)",k,1..6))
Execute(Zip("SetLineThickness(Lnexor"+k+",2)",k,1..6))
List={"O","V0","V1","A1","A2","A1d","A2d","lineA","lineC","perpCA","Q"}
Execute(Zip("SetConditionToShowObject("+obj+",false)",obj,List))
Execute(Zip("SetConditionToShowObject(nexor"+k+",false)",k,1..6))
Delete(List)
#------------------------
# Start button : On Click
#------------------------
SetActiveView(-1)
CenterView((0,0,0))
SetValue(On,If(On,false,true))
SetCaption(buttStart,If(On,"Stop","Start"))
SetSpinSpeed(If(On,1,0))
StartAnimation(ϕ,If(On,true,false))