// Last edited on 2019-07-17 05:37:38 by stolfilocal // Processed by remove-cam-lights #declare roleta1 = seed(15); #declare limites = 140; background{ color rgb < 0.1, 0.1, 0.1 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.85, 0.30 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #declare tx_vidro = 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 tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.12, 0.14 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #declare tx_louco = texture{ pigment{ checker color rgb < 0.9, 0.9, 0.9 >, color rgb < 0.0, 0.6, 0.9 > } finish{ diffuse 0.9 reflection 0.01 ambient 0.1 specular 0.1 roughness 0.01 } scale 0.3 } #declare tx_eks = texture{ pigment{ color rgb < 0.80, 0.10, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_buruu = texture{ pigment{ color rgb < 0.00, 0.10, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_epsilon = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_grama = texture{ pigment{ color rgb <0.75,1,0>} normal { bumps 0.50 scale 0.10} } #declare tx_b1 = texture{ pigment{ color rgb < 0.00, 0.00, 1.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_b2 = texture{ pigment{ color rgb < 0.05, 0.05, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_b3 = texture{ pigment{ color rgb < 0.10, 0.10, 0.80 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_b4 = texture{ pigment{ color rgb < 0.15, 0.15, 0.75 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_b5 = texture{ pigment{ color rgb < 0.15, 0.15, 0.60 > } finish{ diffuse 0.9 ambient 0.1 } } #declare boleta1 = sphere { < 0, 0, 0>, 0.25 // Near lower left corner texture{ tx_b1 } } #declare boleta2 = sphere { < 0, 0, 0>, 0.25 // Near lower left corner texture{ tx_b2 } } #declare boleta3 = sphere { < 0, 0, 0>, 0.25 // Near lower left corner texture{ tx_b3 } } #declare boleta4 = sphere { < 0, 0, 0>, 0.25 // Near lower left corner texture{ tx_b4 } } #declare boleta5 = sphere { < 0, 0, 0>, 0.25 // Near lower left corner texture{ tx_b5 } } #declare bolinhaRosa = sphere { < 0, 0, 0>, 0.25 // Near lower left corner texture{ tx_eks } } #declare bolinhaVerde = sphere { < 0, 0, 0>, 0.30 // Near lower left corner texture{ tx_grama } } #declare bolinhaAzul = sphere { < 0, 0, 0>, 0.20 // Near lower left corner texture{ tx_buruu } } #declare boletassa = sphere { < 0, 0, 0>, 0.40 // Near lower left corner texture{ tx_louco } } #declare P = array[10][4] { {<0, 0, 0>, <0, 5, 0>, <0, 5, 5>, <0, 0, 5>}, {<0, 0, 0>, <5, 0, 0>, <5, 5, 0>, <0, 5, 0>}, {<0, 0, 0>, <0, 0, 5>, <5, 0, 5>, <5, 0, 0>}, {<5, 0, 5>, <5, 5, 5>, <5, 5, 0>, <5, 0, 0>}, {<5, 5, 0>, <5, 5, 5>, <5, 0, 0>, <5, 0, 5>}, {<5, 0, 0>, <5, 0, 5>, <5, 5, 5>, <5, 0, 0>}, {<0, 0, 0>, <0, 0, 0>, <0, 0, 0>, <0, 0, 0>}, {<0, 0, 0>, <0, 0, 0>, <0, 0, 0>, <0, 0, 0>}, {<0, 0, 0>, <0, 0, 0>, <0, 0, 0>, <0, 0, 0>}, {<0, 0, 0>, <0, 0, 0>, <0, 0, 0>, <0, 0, 0>} }; #declare RS = array[6][4] { {<0, -30, 0>, <-5, -30, 0>, <-5, 0, 0>, <0, 0, 0>}, {<0, 0, 0>, <5, 0, 0>, <5, 15, 0>, <0, 15, 0>}, {<0, 15, 0>, <-30, 15, 0>, <-30, -15, 0>, <0, -15, 0>}, {<0, -15, 0>, <30, -15, 0>, <30, 15, 0>, <0, 15, 0>} {<0, 15, 0>, <-5, 15, 0>, <-5, 0, 0>, <0, 0, 0>}, {<0, 0, 0>, <5, 0, 0>, <5, -30, 0>, <0, -30, 0>}, }; #declare ZRS = array[6][4] { {<0, -30, 0>, <-5, -30, 5>, <-5, 0, 5>, <0, 0, 0>}, {<0, 0, 0>, <5, 0, -5>, <5, 15, 5>, <0, 15, 5>}, {<0, 15, 5>, <-30, 15, 0>, <-30, -15, 0>, <0, -15, -5>}, {<0, -15, -5>, <30, -15, 0>, <30, 15, 0>, <0, 15, -5>} {<0, 15, -5>, <-5, 15, 0>, <-5, 0, 0>, <0, 0, 5>}, {<0, 0, 5>, <5, 0, -5>, <5, -30, -5>, <0, -30, 0>}, }; #macro interp1(P1, P2, T1, T2, T) (P1+(T1+T/(T2-T1))*(P2-P1)) #end #macro interp3(A0, A1, A2, A3, T0, T3, TT) #local A01 = interp1(A0, A1, T0, T3, TT); #local A12 = interp1(A1, A2, T0, T3, TT); #local A23 = interp1(A2, A3, T0, T3, TT); #local A012 = interp1(A01, A12, T0, T3, TT); #local A123 = interp1(A12, A23, T0, T3, TT); #local A0123 = interp1(A012, A123, T0, T3, TT); A0123 #end #macro curvar(n, vetor, i) union{ #declare j = 0; #declare p = 1/n; #while(j < n) object{ bolinha translate interp3(vetor[i][0], vetor[i][1], vetor[i][2], vetor[i][3], 0, n, j) } #declare j = j + p; #end } #end #macro curvarTX(n, vetor, i, TX) union{ #declare j = 0; #declare p = 1/n; #while(j < n) object{ TX translate interp3(vetor[i][0], vetor[i][1], vetor[i][2], vetor[i][3], 0, n, j) } #declare j = j + p; #end } #end #macro skeleton(vetor, i, raio) union{ cylinder {vetor[i][0], vetor[i][1], raio} cylinder {vetor[i][1], vetor[i][2], raio} cylinder {vetor[i][2], vetor[i][3], raio} texture{tx_epsilon} } #end #macro suavizar(P, N, i) #local j = mod(i+1, N); #local vv = (P[j][1] - P[i][2])/2; #declare P[i][2] = P[i][3] - vv; #declare P[j][1] = P[j][0] + vv; #end #macro noh(P, N, M) #declare i = 0; #while(i < N) curvar(M, P, i) skeleton(P, i, 0.01) #declare i = i + 1; #end #end #macro nohTX(P, N, M, TX) #declare i = 0; #while(i < N) curvarTX(M, P, i, TX) #declare i = i + 1; #end #end #macro interpola1matriz(P, Q, N, c0, c1, cc, R) #declare i = 0; #while(i < N) #declare k = 0; #while(k < 4) #declare R[i][k] = interp1(P[i][k], Q[i][k], c0, c1, cc); #declare k = k + 1; #end #declare i = i + 1; #end #end #macro curvarMatrizTX(n, P, Q, i, TX, R) #declare j = 0; #declare p = 1/n; #while(j < n) interpola1matriz(P, Q, n, 0, n, j, R) object{ nohTX(R, n, 60, TX) } #declare j = j + p; #end #end #include "eixos.inc" #declare R = array[6][4] { {<0, 0, 0>, <0, 0, 0>, <0, 0, 0>, <0, 0, 0>}, {<0, 0, 0>, <0, 0, 0>, <0, 0, 0>, <0, 0, 0>}, {<0, 0, 0>, <0, 0, 0>, <0, 0, 0>, <0, 0, 0>}, {<0, 0, 0>, <0, 0, 0>, <0, 0, 0>, <0, 0, 0>}, {<0, 0, 0>, <0, 0, 0>, <0, 0, 0>, <0, 0, 0>}, {<0, 0, 0>, <0, 0, 0>, <0, 0, 0>, <0, 0, 0>} }; union{ //object{eixos(3.00)} suavizar(ZRS, 6, 0) suavizar(ZRS, 6, 1) suavizar(ZRS, 6, 2) suavizar(ZRS, 6, 3) suavizar(ZRS, 6, 4) suavizar(ZRS, 6, 5) interpola1matriz(RS, ZRS, 6, 0, 5, 0, R) nohTX(R, 6, 50, boleta1) interpola1matriz(RS, ZRS, 6, 0, 5, 1, R) nohTX(R, 6, 50, boleta2) interpola1matriz(RS, ZRS, 6, 0, 5, 2, R) nohTX(R, 6, 50, boleta3) interpola1matriz(RS, ZRS, 6, 0, 5, 3, R) nohTX(R, 6, 50, boleta4) interpola1matriz(RS, ZRS, 6, 0, 5, 4, R) nohTX(R, 6, 50, boleta5) interpola1matriz(RS, ZRS, 6, 0, 5, 5, R) nohTX(R, 6, 50, boletassa) } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 30.0; #declare dir_camera = < 4.00, 3.00, 4.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)