// Last edited on DATE TIME by USER // Processed by remove-cam-lights background{ color rgb < 1.0, 1.0, 1.0 > } #declare tx_red = texture{ pigment{ color rgb < 0.90, 0.20, 0.20 > } finish{ diffuse 0.8 ambient 0.4 specular 0.5 roughness 0.005 } } #declare tx_blue = texture{ pigment{ color rgb < 0.30, 0.30, 1.0 > } finish{ diffuse 0.8 ambient 0.5 specular 0.7777777 roughness 0.005 } } #declare tx_green = texture{ pigment{ color rgb < 0.20, 0.90, 0.20 > } finish{ diffuse 0.8 ambient 0.4 specular 0.5 roughness 0.005 } } #declare tx_steel = texture{ pigment { rgb <0.55, 0.5, 0.45> } finish { metallic ambient 0.1 diffuse 0.65 specular 0.85 roughness 0.01 reflection 0.45 brilliance 1.5} } #declare tx_black = texture{ pigment{ color rgb < 0.30, 0.30, 0.30 > } finish{ diffuse 0.5 ambient 0.2 } } #declare tx_glass = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare zero = 0.0000001; #declare rseed = seed(10); #macro wheel (R) union { torus {R,R/12 texture {tx_black}} #local i=0; #while (i<8) cylinder {<-R,0,0>,,R/20 rotate<0,i*45,0> texture {tx_steel}} #local i=i+1; #end } #end #macro axle (R,A) union { object {wheel(R) translate <0,(-A/2)-(R/12),0>} object {wheel(R) translate <0,(A/2)+(R/12),0>} cylinder {<0,(-A/2)-(R/12),0>,<0,(A/2)+(R/12),0>,R/18 texture {tx_steel}} } #end #macro wheeledSeat (L,H,R) union { object {axle (R,L) translate <0,0,(-R/2)-(R/18)>} box {<0,0,0>, translate <-L/2,-L/2,(-R/2)+(R/18)> texture {tx_red}} translate <0,0,(-H/2)+(R/7)> } #end #macro easyBezier (A) object { retalho (A[0][0],A[0][1],A[0][2],A[0][3],A[1][0],A[1][1],A[1][2],A[1][3],A[2][0],A[2][1],A[2][2],A[2][3],A[3][0],A[3][1],A[3][2],A[3][3], zero, tx_blue, tx_red) } #end #macro plainBezierPatch (L,H) #local A = array[4][4]; #local i=0; #while (i<4) #local j=0; #while (j<4) #if ((mod(i,3)*mod(j,3))=0) #local A[i][j] = ; #else #local A[i][j] = ; #end #local j=j+1; #end #local i = i+1; #end object {easyBezier(A) translate <-L/2,-L/2,0>} #end #macro endBezierPatch (L,H) #local A = array[4][4]; #local i=0; #while (i<4) #local j=0; #while (j<4) #if ((mod(i,3)*j)=0) #local A[i][j] = ; #else #local A[i][j] = ; #end #local j=j+1; #end #local i = i+1; #end object {easyBezier(A) translate <-L/2,-L/2,0>} #end #macro curveBezier (L,H,D) #local A = array[4][4]; #local A[0][0] = <0,0,0>; #local A[0][1] = ; #local A[0][2] = <2*L/3,0,0>; #local A[0][3] = ; #local A[1][0] = <0,0,H>; #local A[1][1] = ; #local A[1][2] = <2*L/3,0,H>; #local A[1][3] = ; #local A[2][0] = <0,D,H>; #local A[2][1] = ; #local A[2][2] = <2*L/3,D,H>; #local A[2][3] = ; #local A[3][0] = <0,D,H/3>; #local A[3][1] = ; #local A[3][2] = <2*L/3,D,H/3>; #local A[3][3] = ; object {easyBezier(A) translate <-L/2,-D/2,0>} #end #macro backrest (L,H) union { object {endBezierPatch (L,H)} object {endBezierPatch (L,H) rotate <0,0,180> translate<0,L,0>} rotate <90,0,0> rotate <0,0,90> } #end #macro simpleSeat (L,H,D) union { object {backrest (L,H) translate <-L/2,0,0>} object {plainBezierPatch (L,H)} object {curveBezier (L,L,D) translate <0,L/2,0>} object {curveBezier (L,L,D) rotate <0,0,180> translate <0,-L/2,0>} } #end #include "eixos.inc" #include "retalho.inc" union { object {wheeledSeat (4,2,3)} object {simpleSeat (4,2,1)} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 10; #declare dir_camera = < 20, 40, 50 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)