Like Keishiro Ueki

Author:
Thijs
Based on work from上木 敬士郎 Keishiro Ueki @ChocoLinkage Setup Script Delete(Frame) Lobj={"Lα","Lk","Lm","Ln","LO","LB","LC","LG","LL"} Execute(Zip("Delete("+obj+")", obj,Lobj)) #----------------------------------------- # Frame + Engine + Transmission #----------------------------------------- α= Slider(0,360°,1°, 5, 300, true ,true) Lα = Zip(α+k*90°, k,{0,2,1,3}) LG = {(0,0),(14,0),(16,7),(-2,7),(0,0),(16,7)} Frame = Polyline(LG) LA = Zip((1;α)+( 2,7), α,Lα) LA'= Zip((1;α)+(14,7), α,Lα) LO = {(0,0),(0,0),(12,0),(12,0)} LB = {(0,7),(0,7),(12,7),(12,7)} LC = {(2,7),(2,7),(14,7),(14,7)} LD = Zip((1;α)+C, α,Lα, C,LC) LE = Zip(Intersect(Circle(D,2.5), Circle(B,2.5), 1), B,LB, D,LD) LF = Zip(Reflect(D,E), D,LD, E,LE) LAA'= Zip(Segment(A,A'), A,LA, A',LA') Lk = {3, 1, 2, 3, 4, 2, 1, 4} LsA = Polyline(Zip(Element(LA ,k), k,Lk)) LsA'= Polyline(Zip(Element(LA',k), k,Lk)) LCD = Zip(Segment(C,D) , C,LC, D,LD) LDF = Zip(Segment(D,F) , D,LD, F,LF) LBE = Zip(Segment(B,E) , B,LB, E,LE) #----------------------------------------- # Legs #----------------------------------------- Lu= Zip(Vector(O,Intersect(Circle(O,2), Circle(F,2), 1)), O,LO, F,LF) Lv= Zip(Vector(O,Intersect(Circle(O,2), Circle(F,2), 2)), O,LO, F,LF) LM= ZIP({{x(u),x(v),1}, {y(u),y(v),0}}, u,Lu, v,Lv) LL ={( 1, 1, 0),( 1, 0, 0),( 1,-1, 0),( 0, 1, 0),( 0, 0, 0),( 0, 0, 1),(-1, 0, 0),(-2, 0, 0),(-2, 0, 1),(-2,-1, 0),(-1,-3, 0),(-2,-3, 0),(-2,-3, 1),(-3,-3, 0),(-3,-3, 1),(-3,-3, 2)} LLP= Zip(O + Zip(M*L ,L,LL), O,LO, M,LM) Lm={ 1,6,2, 3,13,11, 1,4, 7, 8, 9, 5,8,12,14} Ln={ 4,9,8,10,15,14, 3,5,11,12,13, 6,9,13,16} Ls=Zip(Zip(Segment(Element(LP,m),Element(LP,n)) ,m,Lm, n,Ln), LP,LLP) #----------------------------------------- # Settings #----------------------------------------- Lobj={"Frame","LsA","LsA'"} Execute(Zip("ShowLabel("+obj+",false)", obj,Lobj)) SetVisibleInView(LG, 1, true) SetVisibleInView(Lu, 1, false) SetVisibleInView(Lv, 1, false) Lobj={"LA","LA'","LO","LB","LC","LD","LE","LF","LG","LLP"} Execute(Zip("SetPointSize("+obj+",4)", obj,Lobj)) Execute(Zip("SetDynamicColor("+obj+",0,0,0)", obj,Lobj)) Lobj= {"Frame","LsA","LsA'","LAA'","LBE","LCD","LDF","Ls"} Execute(Zip("SetDynamicColor("+obj+",0,0,0)", obj,Lobj)) Delete(Lobj) ShowGrid(false) ShowAxes(false) CenterView((7,-1)) SetVisibleInView(α,1,false) StartAnimation(α1,true)