#include "colors.inc" // ====================================================================== // CÂMERA camera { location <0,6,30> right -0.75*x up 1*y sky y look_at <0, 0, 0> rotate 180*y } // Nota: os parâmetros "right" e "up" devem ter a mesma proporção // que os parâmetros ${WIDTH} e ${HEIGHT} no Makefile. // ====================================================================== // FONTES DE LUZ light_source { <15, 15, -10> color rgb <1, 1, 1> } light_source { <10, 10, -20> color rgb <1, 1, 0.9> } // ====================================================================== // DESCRIÇÃO DA CENA sky_sphere { pigment { gradient y color_map { [0.0 rgb <0.6,0.7,1.0>] [0.7 rgb <0.0,0.1,0.8>] } } } plane { y, -15 pigment { color rgb <0.7,0.5,0.3> } } #declare noh = sphere { <0,0,0>, 1 pigment {color Red} } #declare aresta = cylinder { <0,0,0>, <0,2.2,0>, 0.15 pigment {color Blue} } //h eh a altura da minha arvore //algoritmo recursivo copiado de um lab de mc202..... #macro minhaArvore(h) #if (h>1) object { noh translate <(h-1)*-2,h*-2.8,0> } object { aresta rotate -45*z translate <(h-1)*-2,h*-2.6,0> } object { aresta rotate 45*z translate <(h-1)*2,h*-2.6,0> } object { noh translate <(h-1)*2,h*-2.8,0> } minhaArvore(h-1) minhaArvore(h-1) #else object { noh translate<0,-3,0> } #end #end //arvore de altura 4 minhaArvore(5)