$fn=256; color ("red") Frame (); A=100; L=A*sqrt(3); phi=-60+$t*180; //for (phi=[-60:4:120]) { if (phi>=90&&phi<120) { X1=L*abs(cos(phi))/2; Y1=L; X2=1.5*A*abs(sin(phi)); Y2=L*abs(sin(90-phi))/2; Y3=1.5*A*abs(cos(90-phi)); X=abs(X1+X2); echo("X=",X); Y=Y1+Y2-Y3; echo("Y=",Y); Xw=200-100*Y/L; echo("Xw",Xw); translate ([-A+Y*tan(30),L-Y,0]) rotate ([0,0,phi]) Lens (); }; if (phi>=60&&phi<90) { X1=L*abs(cos(phi))/2; Y1=L; X2=1.5*A*abs(sin(phi)); Y2=L*abs(sin(90-phi))/2; Y3=1.5*A*abs(cos(90-phi)); X=abs(X1+X2); echo("X=",X); Y=Y1-Y2-Y3; echo("Y=",Y); Xw=200-100*Y/L; echo("Xw",Xw); translate ([-A+Y*tan(30),L-Y,0]) rotate ([0,0,phi]) Lens (); }; if (phi>=0&&phi<60) { X1=L*abs(sin(phi)); Y1=L*(1-abs(cos(phi))); X2=0.5*L*abs(sin(phi)); Y2=0.5*L*abs(cos(phi)); X3=150*abs(cos(phi)); Y3=150*abs(sin(phi)); X=abs(X1-X2+X3); echo("X=",X); Y=Y1+Y2+Y3; echo("Y=",Y); Xw=200-100*Y/L; echo("Xw",Xw); translate ([Xw-X,L,0]) rotate ([0,0,phi]) Lens (); }; if (phi>=-60&&phi<0) { X1=L*abs(sin(phi)); Y1=L*(1-abs(cos(phi))); X2=0.5*L*abs(sin(phi)); Y2=0.5*L*abs(cos(phi)); X3=150*abs(cos(phi)); Y3=150*abs(sin(phi)); X=abs(-X1+X2-X3); Y=Y1+Y2+Y3; Xw=200-100*Y/L; translate ([-Xw+X,L,0]) rotate ([0,0,phi]) Lens (); }; //} // deze is nodig voor multiexposure module Lens () { translate ([0,-L/2,0]) linear_extrude (height=4,convexity=10) { for (i=[0,1]) mirror ([0,i,0]) translate ([0,-L/2,0]) difference() { circle (L+0.5); circle (L-0.5); translate ([-250,-300+L/2,0]) square([500,300]); }; // einde difference translate ([0,0,0]) square ([3*A,1],true); translate ([0,0,0]) square ([1,L],true); }; }; // einde module Lens // hulplijnen in het Frame //rotate ([0,0,60]) translate ([100,0,0]) cube ([200,1,1],true); //rotate ([0,0,120]) translate ([100,0,0]) cube ([200,1,1],true); //translate ([0,L,0]) cube ([200,1,1],true); module Frame () { linear_extrude (height=3,convexity=10) { square ([400,1],true); translate ([-200,0,0]) rotate ([0,0,60]) translate ([200,0,0]) square ([400,1],true); translate ([200,0]) rotate ([0,0,120]) translate ([200,0]) square ([400,1],true); // hulplijnen in het Frame //translate ([-100,100*sqrt(3),0]) square ([200,1]); //translate ([-200,0]) rotate ([0,0,30]) square ([500*sqrt(3),1]); //translate ([0,0]) rotate ([0,0,60]) square ([200,1]); //translate ([0,0]) rotate ([0,0,120]) square ([200,1]); //translate ([200,0,0]) rotate ([0,0,150]) square ([500*sqrt(3),1],true); }; }; // einde module Frame