Dual Axis Illusion 3

Author:
Thijs
Topic:
Rotation
Setup Script CurH = Curve((cos(2φ), cos(3φ), sin(3φ)), φ, 0°, 361°) CurV = Curve((sin(2φ), cos(3φ),-cos(2φ)), φ, 0°, 361°) α = Slider(-720°,720°,2°, 0.25, 200, true, true, true) αh = abs(α)/2 αRH= abs(α)*1.5 αRV= abs(α)-90° k = 2 + floor(α / (360°)) hor= (k==1 || k==3) cH = Rotate(CurH, αRH, xAxis) cV = Rotate(CurV, αRV, yAxis) LφH= {30°-αh, 150°-αh, 270°-αh, 30°, 120°, 210°, 300°} LφV= {30°, 150°, 270°, 30°+αh, 210°+αh, 240°+αh, 60°+αh} LsH= Zip(Sphere(Rotate(CurH(φH), αRH, xAxis), 0.1), φH,LφH) LsV= Zip(Sphere(Rotate(CurV(φV), αRV, yAxis), 0.1), φV,LφV) opac(α) = ((1-cos(α))/2)^0.8 cylH = (y^2+z^2=0.5) cylV = (x^2+z^2=0.5) #============================================= # Setting #============================================= SetActiveView(-1) SetBackgroundColor("Black") SetViewDirection((0,0,-1)) ShowAxes(-1,false) ShowGrid(-1,false) ZoomIn(-1.3,-1.3,-1.3, 1.3, 1.3, 1.3) SetConditionToShowObject(CurH, false) SetConditionToShowObject(CurV, false) SetConditionToShowObject(opac, false) SetConditionToShowObject(cH, hor) SetConditionToShowObject(cV, !hor) ShowLabel(cH, false) ShowLabel(cV, false) SetColor(cH, "White") SetColor(cV, "White") SetLineThickness(cH, 20) SetLineThickness(cV, 20) SetConditionToShowObject(LsH, hor) SetConditionToShowObject(LsV, !hor) SetColor(LsH, "White") SetColor(LsV, "White") ShowLabel(cylH, false) ShowLabel(cylV, false) SetConditionToShowObject(cylH, hor) SetConditionToShowObject(cylV, !hor) SetDynamicColor(cylH, 1,0.4,0, If( hor, opac(α), 0)) SetDynamicColor(cylV, 0,0.4,1, If(!hor, opac(α), 0)) SetValue(α, 0) StartAnimation(α, True) #============================================= # After Setup: #============================================= # α : Set repeat: Increasing # cH: Set Hidden Line Style: Unchanged # cV: Set Hidden Line Style: Unchanged # cH,cV, LsH,LsV, cylH,cylV: Set Selection Allowed: False # If curve isn't clear white then use Setup again