//Millennium Falcon, 2nd try :) /* rules: - follow the measures of http://www.studioscale.com/BlueprintsFalcon32/falconbase.pdf - try to do all comments in english, so people will actually understand them */ #version unofficial MegaPOV 1.1; #default {pigment {rgb 1} finish {ambient 0 diffuse 1 brilliance 1}}// specular 10 roughness .01}} //+am2 +a0.01 +r2 -GW +sp8 +ep4 #declare Zoom=17.0; #declare Axis=x*2-z; //+y-z; #declare Center=<-279.40,19.35+(0*76.2+51.27)/4,-239.68-50>;//-<0,0,520-336.91>*.5; camera { orthographic location Axis*50000+Center right x*900/Zoom up y*(900*3/4)/Zoom look_at Center } background {rgb 1} #declare K=clock; camera { //location <-1200+600*K,600-2400*K,-1200+2400*K>/(2-K*.5) location <-.5,.5,-1>*150 //look_at -<0,0,520-336.91>*.5 look_at 0 translate Center } light_source { <500,750,500>*10000 rgb <1.5,1.4,1.3>/1.5 } /*light_source { <500,750,-500>*10000 rgb <.5,.4,.3> shadowless } light_source { <-500,750,500>*10000 rgb <.4,.5,.9> }*/ /*camera { location 0 look_at -z angle 80 translate <-279.40,19.35+51.27/3,-239.68-1> }*/ #declare Aantal=140; #declare Tel=0; #declare Seed=seed(15); #while (Tel*360) rgb 1.5*<.7,.8,.9>/Aantal //parallel point_at 0 //area_light x*5000,y*5000,2,2 adaptive 1 jitter } #declare Tel=Tel+1; #end //main shape: //main hull: #declare DockingportCut= intersection { #local Angle=90-degrees(atan2(158,51)); plane {x,-270.31} plane {z,0 rotate y*Angle translate -x*270.31+z*93.78/2} plane {-z,0 rotate -y*Angle translate -x*270.31-z*93.78/2} } #declare tophalf= union { #declare mainhull= intersection { sphere {0,1 scale <441,39+91.25,441> translate y*(14-90)} cylinder {0,y*38.10,317.5 translate y*14} intersection { cylinder {-y,y*39.10,304.8 translate y*14 inverse} plane {z,0 rotate y*degrees(atan2(648,952))} plane {z,0 rotate -y*degrees(atan2(648,952))} inverse } intersection { cylinder {-y,y*60,231.14} cylinder {-y,y*60,154.27 inverse} plane {-z,0 rotate y*degrees(atan2(51,294)) translate -x*104.77+z*57.94} plane {z,0 rotate y*degrees(atan2(221,200)) translate -x*104.77+z*57.94} sphere {0,1 scale <441,39+91.25,441> translate y*(14-90-9) inverse} inverse } intersection { cylinder {-y,y*60,231.14} cylinder {-y,y*60,154.27 inverse} plane {-z,0 rotate y*degrees(atan2(51,294)) translate -x*104.77+z*57.94} plane {z,0 rotate y*degrees(atan2(221,200)) translate -x*104.77+z*57.94} sphere {0,1 scale <441,39+91.25,441> translate y*(14-90-9) inverse} scale <-1,1,1> inverse } intersection { intersection { plane {z,0} plane {-z,43.65} plane {-x,20.1/2} plane {x,(40.74-20.1/2)} plane {z,0 rotate -y*45} plane {z,0 rotate y*45 translate x*(40.74-20.1) } plane {-z,0 rotate y*45 translate -z*43.65} plane {-z,0 rotate -y*45 translate -z*43.65+x*(40.74-20.1)} rotate y*degrees(atan2(48,76)) translate -x*108.47-z*161.38 } sphere {0,1 scale <441,39+91.25,441> translate y*(14-90-5.29) inverse} inverse } } //motor-section #declare Motorsection= intersection { sphere {0,1 scale <441,39+91,441> translate y*(14-90) translate y*6.36} cylinder {0,y*(38.10+16.36),336.91 translate y*14} box {<-429.7/2,0,0>,<429.7/2,14+39+16.36,520>} plane {-z,0 rotate y*45.18} plane {-z,0 rotate -y*45.18} cylinder {-y,y*100,77.47 inverse} } object {Motorsection} intersection { union { cylinder {0,y*160,50/2 translate z*266.94/2} cylinder {0,y*160,50/2 translate z*266.94/2 rotate y*45/2} cylinder {0,y*160,50/2 translate z*266.94/2 rotate -y*45/2} cylinder {0,y*160,50/2 translate z*400.5/2} cylinder {0,y*160,50/2 translate z*400.5/2 rotate y*45/2} cylinder {0,y*160,50/2 translate z*400.5/2 rotate -y*45/2} } object {Motorsection translate y*3.35} } difference{object{mainhull} object{DockingportCut} object{DockingportCut scale <-1,1,1>}} #declare Dockingport= difference { cone {-x*270.31,76.20/2,-x*(270.31+33.02),65.74/2} cylinder {-x*(270.31+29.10),-x*(270.31+34),61.15/2} } object {Dockingport} object {Dockingport scale <-1,1,1>} //"jaws" intersection { plane {y,0 rotate -x*degrees(atan2(114,1015)) translate -z*95.77+y*60.85} plane {y,0 rotate x*degrees(atan2(36,13)) translate -z*95.77+y*60.85} plane {y,0 rotate -x*degrees(atan2(64,48)) translate -z*364.55+y*30.42} plane {-y,-14.02} #local SidePlane= plane {-x,0 matrix < 1 , 0 ,0, 45/63 , 1 ,0, -19.58/268.78,114/1015,1, -49.74 ,60.85 ,-95.77> } object {SidePlane} object {SidePlane scale <-1,1,1>} } cone {0,77.47,y*10.05,151.32/2 translate y*(14+38.1)} //mountingpoint for radardish: cylinder {0,y*44.45,23.81 translate x*144.49-z*155.27} } #declare middleSection= union { difference { cylinder {-y*14,y*14,304.8} object{DockingportCut} object{DockingportCut scale <-1,1,1>} } #declare Pnt=trace(mainhull,<-270.31,500,93.78/2>,-y); #declare DockingTube= prism { linear_sweep linear_spline -270.31,270.31 9 <-114.3/2,-61.15/2>, <-114.3/2,61.15/2>, <-Pnt.y,93.78/2>, , <114.3/2,61.15/2>, <114.3/2,-61.15/2>, , <-Pnt.y,-93.78/2>, <-114.3/2,-61.15/2> rotate -z*90 } intersection { object {DockingTube} union { intersection { plane {-x,0 rotate -z*45 translate x*90.21+y*114.30/2 } plane {-x,0 rotate z*45 translate x*90.21-y*114.30/2 } } intersection { plane {-x,0 rotate -z*45 translate x*90.21+y*114.30/2 } plane {-x,0 rotate z*45 translate x*90.21-y*114.30/2 } scale <-1,1,1> } } } //Mandibles #local Pnt=vrotate(x*304.8,y*degrees(atan2(648,952))); #declare Mandible= intersection { plane {-x,-101.6/2} plane {y,27.78/2} plane {-y,27.78/2} plane {x,0 rotate y*degrees(atan2(622,1319)) translate x*Pnt.x+z*Pnt.z} plane {z,Pnt.z} plane {-z,520} cylinder {y*(27.78/2 - 6.35),y*20,19.31 translate x*139.05-z*306.45 inverse} cylinder {y*(27.78/2 - 6.35),y*20,19.31 translate x*98.72-z*387.60 inverse} cylinder {y*(27.78/2 - 6.35),y*20,19.31 translate x*139.05-z*306.45 scale <1,-1,1> inverse} cylinder {y*(27.78/2 - 6.35),y*20,19.31 translate x*98.72-z*387.60 scale <1,-1,1> inverse} } object {Mandible} object {Mandible scale <-1,1,1>} } #declare downhalf= union { #declare mainhull= intersection { sphere {0,1 scale <441,39+91.25,441> translate -y*(14-90)} cylinder {0,-y*38.10,317.5 translate -y*14} intersection { cylinder {y,-y*39.10,304.8 translate -y*14 inverse} plane {z,0 rotate y*degrees(atan2(648,952))} plane {z,0 rotate -y*degrees(atan2(648,952))} inverse } intersection { plane {x,194.98} plane {-x,-169.58} cylinder {0,-y*60,232.38} plane {z,0 rotate y*degrees(atan2(44,96)) translate -z*65.08+x*194.98} sphere {0,1 scale <441,39+91.25,441> translate -y*(14-90-2.65) inverse} inverse } intersection { plane {x,194.98} plane {-x,-169.58} cylinder {0,-y*60,232.38} plane {z,0 rotate y*degrees(atan2(44,96)) translate -z*65.08+x*194.98} sphere {0,1 scale <441,39+91.25,441> translate -y*(14-90-2.65) inverse} scale <-1,1,1> inverse } } //motor-section #declare Motorsection= union { intersection { sphere {0,1 scale <441,39+91,441> translate -y*(14-90) translate -y*6.36} cylinder {0,-y*(38.10+16.36),336.91 translate -y*14} box {<-429.7/2,0,0>,<429.7/2,-(14+39+16.36),520>} cylinder {0,-y*(38.10+16.36),304.8 translate -y*14 inverse} } difference { prism { linear_spline linear_sweep 0,-55.82 10 <0,259.12>,<75.03,245.64>,<315.27/2,200.12>,<315.27/2,75.40>,<118.26,56.61>, <-118.26,56.61>,<-315.27/2,75.40>,<-315.27/2,200.12>,<-75.03,245.64>,<0,259.12> } cylinder {y,-y*60,98.83} } intersection { box {<-60.72-106.57,0,-51.33>,<60.72+106.57,-55.82,-269>} box {<-60.72,1,-50>,<60.72,-60,-270> inverse} cylinder {y,-y*60,232.38} cylinder {y,-y*60,98.83 inverse } } } object {Motorsection} difference{object{mainhull} object{DockingportCut} object{DockingportCut scale <-1,1,1>}} //"jaws" intersection { plane {y,0 rotate -x*degrees(atan2(114,1015)) translate -z*95.77+y*60.85} plane {y,0 rotate x*degrees(atan2(36,13)) translate -z*95.77+y*60.85} plane {y,0 rotate -x*degrees(atan2(64,48)) translate -z*364.55+y*30.42} plane {-y,-14.02} #local SidePlane= plane {-x,0 matrix < 1 , 0 ,0, 45/63 , 1 ,0, -19.58/268.78,114/1015,1, -49.74 ,60.85 ,-95.77> } object {SidePlane} object {SidePlane scale <-1,1,1>} scale <1,-1,1> } cone {0,77.47,-y*10.05,151.32/2 translate -y*(14+38.1)} } #macro Interpolate(X1,X2,T) #local R=X1+(X2-X1)*T; R #end #macro HullCrease(W,H,B,A1,A2,Z1,Z2) union { intersection { plane {-y,H} plane {-x,W/2} plane {x,W/2} plane {-x,0 rotate z*A2 translate -y*(H-B)-x*(W/2)} plane {x,0 rotate -z*A2 translate -y*(H-B)+x*(W/2)} plane {-z,-Z1} plane {z,Z2} plane {y,B} plane {z,0 rotate x*A2 translate -y*(H-B)+z*Z2} plane {-z,0 rotate -x*A2 translate -y*(H-B)+z*Z1} } intersection { plane {x,0 rotate -z*A1 translate -y*B+x*W/2} plane {-x,0 rotate z*A1 translate -y*B-x*W/2} plane {y,B} plane {-y,H} plane {-z,-Z1} plane {z,Z2} plane {z,0 rotate x*A2 translate -y*B+z*Z2} plane {-z,0 rotate -x*A2 translate -y*B+z*Z1} } } #end //cockpit: #declare Cockpit= union { //cockpit itself difference { #local RBig=76.2/2; #local Rfullfront=51.27/2; #local Rroundwindow=25/2; #local Frontextend=5; #local FrontextendInside=3; #local Hullthickness=1.512; union { difference { cone {-z*50,Rfullfront,0,RBig} cylinder {-z*(50-(Hullthickness*2)-.01),-z*(50+Hullthickness+.0001),Rfullfront-Hullthickness*1.5} } cylinder {-z*(5-Hullthickness),-z*(50+Hullthickness),Rfullfront-Hullthickness/2} cone {-z*(50+Hullthickness),Rfullfront-Hullthickness/2,-z*(50+Hullthickness+Frontextend),Rroundwindow} //+Hullthickness} } //front of cockpit: union { intersection { cone {-z*(50+Hullthickness),Rfullfront-Hullthickness/2,-z*(50+Hullthickness+FrontextendInside),Rroundwindow+Hullthickness translate z*Hullthickness} cylinder {-z*40,-z*150,Rfullfront-Hullthickness*1.5} } cylinder {-z*40,-z*50.001,Rfullfront-Hullthickness*1.5} } difference { cone {-z*(50+.001),Rfullfront-Hullthickness,z*.001,RBig-Hullthickness} plane {z,-50+Hullthickness} } cylinder {-z*(50+Hullthickness+Frontextend+.001),-z*40,Rroundwindow} difference { cylinder {-z*(50+Hullthickness+Frontextend+.001),-z*41,Rfullfront-Hullthickness*1.5} cylinder {-z*(50+Hullthickness+Frontextend+.002),-z*40,Rroundwindow+Hullthickness} plane {y,0} intersection { plane {-x,Hullthickness/2} plane {x,Hullthickness/2} } intersection { plane {-x,Hullthickness/2} plane {x,Hullthickness/2} union { cone {-z*(50+Hullthickness),Rfullfront-Hullthickness/2,-z*(50+Hullthickness+(FrontextendInside+Frontextend)/2),Rroundwindow} plane {-z,(50+Hullthickness)+.001} } rotate z*45 } intersection { plane {-x,Hullthickness/2} plane {x,Hullthickness/2} union { cone {-z*(50+Hullthickness),Rfullfront-Hullthickness/2,-z*(50+Hullthickness+(FrontextendInside+Frontextend)/2),Rroundwindow} plane {-z,(50+Hullthickness)+.001} } rotate -z*45 } } #local W=.2; #local H=.15; #local B=.05; #local A1=45; #local A2=45; object { HullCrease(W,H,B,A1,A2,-.1,vlength(<0,(Rfullfront-Hullthickness/2)-Rroundwindow,Frontextend>)) rotate -z*180 rotate x*degrees(atan2((Rfullfront-Hullthickness/2)-Rroundwindow,Frontextend)) translate -z*(50+Hullthickness+Frontextend)-y*Rroundwindow } object { HullCrease(W,H,B,A1,A2,-.1,vlength(<0,(Rfullfront-Hullthickness/2)-Rroundwindow,Frontextend>)) rotate -z*180 rotate x*degrees(atan2((Rfullfront-Hullthickness/2)-Rroundwindow,Frontextend)) translate -z*(50+Hullthickness+Frontextend)-y*Rroundwindow rotate -z*40 } object { HullCrease(W,H,B,A1,A2,-.1,vlength(<0,(Rfullfront-Hullthickness/2)-Rroundwindow,Frontextend>)) rotate -z*180 rotate x*degrees(atan2((Rfullfront-Hullthickness/2)-Rroundwindow,Frontextend)) translate -z*(50+Hullthickness+Frontextend)-y*Rroundwindow rotate z*40 } #local W=1.5; #local H=.4; #local B=.1; #local A1=65; #local A2=65; #local Middle=vlength(<0,(Rfullfront-Hullthickness/2)-Rroundwindow,Frontextend>)/2; object { HullCrease(W,H,B,A1,A2,Middle-1.25,Middle+1.75) rotate -z*180 rotate x*degrees(atan2((Rfullfront-Hullthickness/2)-Rroundwindow,Frontextend)) translate -z*(50+Hullthickness+Frontextend)-y*Rroundwindow rotate -z*85 } object { HullCrease(W,H,B,A1,A2,Middle-1.25,Middle+1.75) rotate -z*180 rotate x*degrees(atan2((Rfullfront-Hullthickness/2)-Rroundwindow,Frontextend)) translate -z*(50+Hullthickness+Frontextend)-y*Rroundwindow rotate z*85 } //top and side of cockpit: #local W=.83; #local H=.2; #local B=.075; #local A1=65; #local A2=65; object { HullCrease(W,H,B,A1,A2,-1,60) rotate -z*180 rotate x*degrees(atan2((76.2-51.27)/2,50)) translate -z*(50)-y*(51.27/2) rotate -z*90 } object { HullCrease(W,H,B,A1,A2,-1,60) rotate -z*180 rotate x*degrees(atan2((76.2-51.27)/2,50)) translate -z*(50)-y*(51.27/2) rotate z*90 } object { HullCrease(W,H,B,A1,A2,-1,60) rotate -z*180 rotate x*degrees(atan2((76.2-51.27)/2,50)) translate -z*(50)-y*(51.27/2) rotate -z*40 } object { HullCrease(W,H,B,A1,A2,-1,60) rotate -z*180 rotate x*degrees(atan2((76.2-51.27)/2,50)) translate -z*(50)-y*(51.27/2) rotate z*40 } #local Z1=-Hullthickness*4; #local Z2=-Hullthickness*10; #local A3=5*360/24; #local A1=360/16.5; #local A2=(A1+A3)/2; #local W=.83; #local H=.2; #local B=.075; #local CA1=65; #local CA2=65; #local RadialCrease= intersection { #local CZ=-Hullthickness*14+W/2; #local HorizontalBevel1=B*tan(radians(CA1)); #local HorizontalBevel2=B*tan(radians(CA2)); plane {z,CZ+W/2+HorizontalBevel1} plane {-z,-CZ+W/2+HorizontalBevel1} union { #local CZ1b=(CZ-(W/2)-HorizontalBevel1); #local CZ1=(CZ-(W/2)); #local CZ1B=(CZ-(W/2)+HorizontalBevel2); #local CZ2B=(CZ+(W/2)-HorizontalBevel2); #local CZ2=(CZ+(W/2)); #local CZ2b=(CZ+(W/2)+HorizontalBevel1); #local R1b=Interpolate(76.20/2,51.27/2,abs(CZ1b)/50); #local R1=Interpolate(76.20/2,51.27/2,abs(CZ1)/50)-B; #local R1B=Interpolate(76.20/2,51.27/2,abs(CZ1B)/50)-H; #local R2B=Interpolate(76.20/2,51.27/2,abs(CZ2B)/50)-H; #local R2=Interpolate(76.20/2,51.27/2,abs(CZ2)/50)-B; #local R2b=Interpolate(76.20/2,51.27/2,abs(CZ2b)/50); cone {z*CZ1b,R1b,z*CZ1,R1} cone {z*CZ1,R1+B*2-H,z*CZ1B,R1B} cone {z*CZ1B,R1B,z*CZ2B,R2B} cone {z*CZ2B,R2B,z*CZ2,R2+B*2-H} cone {z*CZ2,R2,z*CZ2b,R2b} inverse } plane {-x,0 rotate z*90} plane {x,0 rotate z*A3} } object {RadialCrease} object {RadialCrease scale <-1,1,1>} intersection { plane {z,Z1} plane {-z,50-Hullthickness*2} plane {x,0 rotate -z*A3} plane {-x,0 rotate z*A3} intersection { plane {-z,-Z2} #local P1=vrotate(-x*Hullthickness+y*Interpolate(76.20/2,51.27/2,-Z1/50),z*A1); #local P2=vrotate(x*Hullthickness+y*Interpolate(76.20/2,51.27/2,-Z1/50),z*A2); #local L=vlength(P2-P1); #local Angle=degrees(atan2(abs(Z2-Z1),L)); plane {-z,0 rotate y*Angle translate -x*Hullthickness+z*Z2 rotate z*A1} plane {-z,0 rotate -y*Angle translate x*Hullthickness+z*Z2 rotate -z*A1} plane {-x,Hullthickness rotate z*A2} plane {x,Hullthickness rotate -z*A2} inverse } #local Bar1= intersection { plane {-x,Hullthickness} plane {x,Hullthickness} inverse } object {Bar1 rotate z*A1} object {Bar1 rotate -z*A1} object {Bar1 rotate -z*A2} object {Bar1 rotate z*A2} intersection { plane {z,-Hullthickness*14} plane {-z,Hullthickness*16} union { plane {x,0 rotate z*A1} plane {-x,0 rotate -z*A1} } inverse } } } #local Edge=.25; #declare CockpitEdgesRight= union { sphere {0,Edge translate y*Interpolate(76.20/2,51.27/2,(-Z2-Edge)/50)+z*(Z2+Edge)-x*(Hullthickness-Edge) rotate z*A1} sphere {0,Edge translate y*Interpolate(76.20/2,51.27/2,(50-Hullthickness*2+Edge)/50)-z*(50-Hullthickness*2+Edge)-x*(Hullthickness-Edge) rotate z*A1} cylinder { y*Interpolate(76.20/2,51.27/2,(-Z2-Edge)/50)+z*(Z2+Edge)-x*(Hullthickness-Edge) , y*Interpolate(76.20/2,51.27/2,(50-Hullthickness*2+Edge)/50)-z*(50-Hullthickness*2+Edge)-x*(Hullthickness-Edge) , Edge rotate z*A1} intersection { torus {Interpolate(76.20/2,51.27/2,(50-Hullthickness*2+Edge)/50) , Edge rotate x*90 translate -z*(50-Hullthickness*2+Edge)} plane {x,(-Hullthickness+Edge) rotate z*A1} plane {-x,(-Hullthickness+Edge) rotate z*A2} } //sphere {0,Edge translate y*Interpolate(76.20/2,51.27/2,(-Z1-Edge)/50)+z*(Z1+Edge)+x*(Hullthickness-Edge) rotate z*A2 pigment {red 10}} sphere {0,Edge translate y*Interpolate(76.20/2,51.27/2,(50-Hullthickness*2+Edge)/50)-z*(50-Hullthickness*2+Edge)+x*(Hullthickness-Edge) rotate z*A2} cylinder { y*Interpolate(76.20/2,51.27/2,(-Z1-Edge)/50)+z*(Z1+Edge)+x*(Hullthickness-Edge) , y*Interpolate(76.20/2,51.27/2,(50-Hullthickness*2+Edge)/50)-z*(50-Hullthickness*2+Edge)+x*(Hullthickness-Edge) , Edge rotate z*A2} //this is de bigger round edge on the top-right window.. a hard shape to do... //this would've worked if the cockpit was a cylinder instead of a cone... /*intersection { torus {Interpolate(76.20/2,51.27/2,(-Z2-Edge)/50) , Edge rotate x*90 translate x*Hullthickness matrix < 1,0,-abs(Z2-Z1)/L, 0,1,0, 0,0,1, 0,0,0> translate -x*Hullthickness translate z*(Z2+Edge) rotate z*A1 pigment {green 5} } plane {x,(-Hullthickness+Edge) rotate z*A1} plane {-x,(-Hullthickness+Edge) rotate z*A2} }*/ //second try... not as clean a solution, but at least it will fit: union { #local maxI=10; #local I=0; #while (I,z*Interpolate(A2,A1,I/maxI)); sphere {Ipoint,Edge} #local Z=Interpolate(Z1+Edge,Z2+Edge,(I+1)/maxI); #local Ipoint2=vrotate(< Interpolate(Hullthickness-Edge,-Hullthickness+Edge,(I+1)/maxI), Interpolate(76.20/2,51.27/2,-Z/50), Z>,z*Interpolate(A2,A1,(I+1)/maxI)); cylinder {Ipoint,Ipoint2,Edge} #local I=I+1; #end } sphere {0,Edge translate y*Interpolate(76.20/2,51.27/2,(-Z1-Edge)/50)+z*(Z1+Edge)-x*(Hullthickness-Edge) rotate z*A2} sphere {0,Edge translate y*Interpolate(76.20/2,51.27/2,(50-Hullthickness*2+Edge)/50)-z*(50-Hullthickness*2+Edge)-x*(Hullthickness-Edge) rotate z*A2} cylinder { y*Interpolate(76.20/2,51.27/2,(-Z1-Edge)/50)+z*(Z1+Edge)-x*(Hullthickness-Edge) , y*Interpolate(76.20/2,51.27/2,(50-Hullthickness*2+Edge)/50)-z*(50-Hullthickness*2+Edge)-x*(Hullthickness-Edge) , Edge rotate z*A2} intersection { torus {Interpolate(76.20/2,51.27/2,(-Z1-Edge)/50) , Edge rotate x*90 translate z*(Z1+Edge)} plane {x,(-Hullthickness+Edge) rotate z*A2} plane {-x,Edge rotate z*A3} } intersection { torus {Interpolate(76.20/2,51.27/2,(50-Hullthickness*2+Edge)/50) , Edge rotate x*90 translate -z*(50-Hullthickness*2+Edge)} plane {x,(-Hullthickness+Edge) rotate z*A2} plane {-x,Edge rotate z*A3} } sphere {0,Edge translate y*Interpolate(76.20/2,51.27/2,(-Z1-Edge)/50)+z*(Z1+Edge)-x*Edge rotate z*A3} sphere {0,Edge translate y*Interpolate(76.20/2,51.27/2,(50-Hullthickness*2+Edge)/50)-z*(50-Hullthickness*2+Edge)-x*Edge rotate z*A3} cylinder {y*Interpolate(76.20/2,51.27/2,(-Z1-Edge)/50)+z*(Z1+Edge)-x*Edge , y*Interpolate(76.20/2,51.27/2,(50-Hullthickness*2+Edge)/50)-z*(50-Hullthickness*2+Edge)-x*Edge , Edge rotate z*A3} intersection { torus {Interpolate(76.20/2,51.27/2,(50-Hullthickness*2+Edge)/50) , Edge rotate x*90 translate -z*(50-Hullthickness*2+Edge)} plane {-x,(-Hullthickness+Edge) rotate z*A1} plane {x,0} } cylinder { y*Interpolate(76.20/2,51.27/2,(50-Hullthickness*2+Edge)/50)-z*(50-Hullthickness*2+Edge)+x*(Hullthickness-Edge), y*Interpolate(76.20/2,51.27/2,(-Z2-Edge)/50)-z*(-Z2-Edge)+x*(Hullthickness-Edge) ,Edge rotate z*A1 } sphere {y*Interpolate(76.20/2,51.27/2,(50-Hullthickness*2+Edge)/50)-z*(50-Hullthickness*2+Edge)+x*(Hullthickness-Edge),Edge rotate z*A1} sphere {y*Interpolate(76.20/2,51.27/2,(-Z2-Edge)/50)-z*(-Z2-Edge)+x*(Hullthickness-Edge),Edge rotate z*A1} intersection { torus {Interpolate(76.20/2,51.27/2,(-Z2-Edge)/50) , Edge rotate x*90 translate -z*(-Z2-Edge)} plane {-x,(-Hullthickness+Edge) rotate z*A1} plane {x,0} } } object {CockpitEdgesRight} object {CockpitEdgesRight scale <-1,1,1>} //cockpit tube intersection { cylinder {0,z*100,76.20/2} plane {z,0 rotate -y*(90-119.95) translate z*64.81} } intersection { cylinder {-z*100,z*210.24,76.20/2 rotate y*(180-119.95) translate z*64.81} plane {-z,0 rotate -y*(90-119.95) translate z*64.81} } translate <-279.4,19.35,-239.68> } #declare MillenniumFalcon= union { object {tophalf} object {downhalf} object {middleSection} object {Cockpit} } //#declare milfal= object {MillenniumFalcon} //controlstuff /* cylinder { 0,y*14,1 //rotate -y*(90-119.95) translate z*64.81 //translate <-279.4,19.35,-239.68>-y*100 //translate <0,0,336.91> translate <0,0,-317.50> pigment {red 10} } cylinder {0,y*Pnt.y,2 pigment {green 10} translate -z*2} cylinder {0,y*27.25,2 pigment {red 10} translate z*2}*/ //light_source {<-279.40,19.35,-239.68-25> red 1}