// Last edited on DATE TIME by stolfi #include "colors.inc" #include "textures.inc" #include "golds.inc" #include "skies.inc" #declare ctr = <0, 0, 0>; #declare camDir = <0,10,-55>; camera { location ctr + 1.30*camDir right -1.00*x up 0.75*y sky y look_at ctr } sky_sphere { S_Cloud4 } plane {y, -30 //this is the grout pigment { checker color Green, color White scale 3 } finish { ambient .4 diffuse .7 } } light_source{ <15, 20, -25> White } light_source{ <-15, 0, -25> White } #declare beta = 1; #declare gama = 1; #declare articulacaoMacho = union { cylinder { <0,0,-1>,<0,0,1>,0.5 } cylinder { <0,0,0>,<1.5,0,0>,0.4 } pigment { Blue } } #declare articulacaoFemea = union { difference { difference { cylinder { <0,0,-1>,<0,0,1>,1 //pigment {Yellow } } cylinder { <0,0,-2>,<0,0,2>,0.5 } } box { <-1,-1,-0.5>, <+1,1,0.5> } } cylinder { <-0.9,0,-1>,<-0.9,0,+1>,0.3 } cylinder { <-0.9,0,0>,<-1.5,0,0>,0.5 } } #declare semente = seed(32); #declare pernas = union { #declare total = 0; #while (total<360) #declare alfa = floor(80*rand(semente)-30); #declare beta = floor(40*rand(semente)-40); #declare gama = floor(80*rand(semente)-20); #declare teta = floor(80*rand(semente)-40); #declare ro = floor(35*rand(semente)-30); union { #declare pe = union { object{articulacaoMacho} cone{ <0.5,0,0>, 0.4, <9,0,0>, 0 } rotate (ro-125)*z pigment{Blue} } #declare antePerna1 = union { object{articulacaoFemea translate 5*x} cone{ <1.5,0,0>, 0.5, <5,0,0>, 0.8 } object{articulacaoMacho } object{pe translate 5*x} rotate (alfa+95)*z pigment{Yellow} } #declare antePerna2 = union { object{articulacaoFemea translate 7*x} cone{ <1.5,0,0>, 0.5, <7,0,0>, 0.8 } object{articulacaoMacho } object{antePerna1 translate 7*x} rotate (beta-30)*z pigment{Red} } #declare antePerna3 = union { object{articulacaoFemea translate 8*x} cone{ <1.5,0,0>, 0.5, <8,0,0>, 0.8 } object{articulacaoMacho } object{antePerna2 translate 8*x} rotate (gama-90)*z pigment{Green} } #declare antePerna4 = union { object{articulacaoFemea translate 6*x} cone{ <1.5,0,0>, 0.7, <6,0,0>, 0.9 } object{articulacaoMacho } object{antePerna3 translate 6*x} rotate (teta+70)*z pigment{Black} } #declare antePerna5 = union { object{articulacaoFemea translate 4*x} cone{ <1.5,0,0>, 0.7, <4,0,0>, 0.9 } object{articulacaoMacho } object{antePerna4 translate 4*x} rotate (ro+10)*z translate 9*x pigment{White} } #declare total = total +60; object{antePerna5} rotate y*(total) } #end } #declare sorriso = difference { difference { cylinder { <0,0,0>,<0,0,0.5>,3 scale <1.8,0.5,1> } cylinder { <0,0,-1>,<0,0,1>,3 scale <1.5,0.4,1> } box { <-6,0,-1><+6,3,1> } } rotate 55*x translate -8.8*z +1.5*y pigment {Yellow} } #declare corpo = sphere { <0,0,0>,10 scale <1,0.2,1> //translate -8*x pigment{Blue} } #declare olhos = union { sphere { <-4,0,0>,3 scale <1,0.4,1> pigment{White} } sphere { <-4,0.5,-2>,1 pigment{Black} } sphere { <4,0,0>,3 scale <1,0.4,1> pigment{White} } sphere { <4,0.5,-2>,1 pigment{Black} } translate +1.5*y -3*z } // Aqui está a cena, finalmente: union { //object{articulacaoFemea} object{pernas} object{corpo} object{olhos} object{sorriso} }