background {color rgb < 0.75, 0.80, 0.85 >} #declare tx_plastico = texture { pigment{ color rgb < 0.90, 0.90, 0.90 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare cilindro_vertice_dois = cylinder { <0, 0, -1>, <0, 0, 1>, 1 // center of one end, center of other end, radius open // remove end caps texture {tx_plastico} } #declare esfera_vertice_dois = sphere { <0, 0, 2>, 1 // , radius texture {tx_plastico} } #declare aresta_horizontal_y = cylinder { <0, 0, 0>, <0, 1, 0>, 0.3 // center of one end, center of other end, radius open // remove end caps texture {tx_plastico} } #declare vertice_dois = union { object {cilindro_vertice_dois} object {esfera_vertice_dois} object {aresta_horizontal_y translate <0, 1, 0>} // object {aresta_horizontal_y translate <0, -2, 0>} } #declare box_vertice_tres = box { <-1, -1, -1>, <1, 1, 1> // near lower left corner, far upper right corner texture {tx_plastico} } #declare esfera_vertice_quatro = sphere { <0, 0, 2>, 1 // , radius texture {tx_plastico} } #declare aresta_horizontal_x = cylinder { <0, 0, 0>, <1, 0, 0>, 0.3 // center of one end, center of other end, radius open // remove end caps texture {tx_plastico} } #declare cone_tres = cone { <0, 0, 1>, 0.5 // , center & radius of one end <0, 0, 2>, 0.25 // , center & radius of the other end texture {tx_plastico} } #declare vertice_tres = union { object {box_vertice_tres} object {cone_tres} object {aresta_horizontal_y translate <0, 1, 0>} object {aresta_horizontal_y translate <0, -2, 0>} object {aresta_horizontal_x translate <1, 0, 0>} } #declare vertice_quatro = union { object {box_vertice_tres} object {esfera_vertice_quatro} object {aresta_horizontal_y translate <0, 1, 0>} object {aresta_horizontal_y translate <0, -2, 0>} object {aresta_horizontal_x translate <1, 0, 0>} object {aresta_horizontal_y translate <0, 1, 2>} } // #macro interpola1(t, t0, v0, t1, v1) // #local ss = (t - t0) / (t1 - t0); // #local vv = (1 - ss) * v0 + ss * v1; // vv // #end // #macro interpola3(t, ta, tb, v0, v1, v2, v3) // #local v01 = interpola1(t, ta, v0, tb, v1); // #local v12 = interpola1(t, ta, v1, tb, v2); // #local v23 = interpola1(t, ta, v2, tb, v3); // #local v012 = interpola1(t, ta, v01, tb, v12); // #local v123 = interpola1(t, ta, v12, tb, v23); // #local v023 = interpola1(t, ta, v012, tb, v123); // v023 // #end union { object {vertice_dois} object {vertice_tres translate <0, 4, 0>} object {vertice_quatro translate <0, -4, 0>} } // #declare x = interpola1(3, 6, <0, 0, 0>, 8, <2, 3, 2>); #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 10.0; #declare dir_camera = < 14.00, 7.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)