#version 3.5; #include "colors.inc" #include "transforms.inc" #include "rad_def.inc" global_settings { assumed_gamma 1.0 // radiosity {Rad_Settings(Radiosity_Normal, off, off)} } // ---------------------------------------- camera { location <7, 25, -20> look_at <5, 3.0, 0.0> // rotate y*-90 } 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>] } } } light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1> // light's color translate <-30, 30, -30> parallel point_at <0,0,0> } plane { y, 0 pigment { color rgb <0.7,0.5,0.3> } } #macro EJES (Radio,posX,posY,posZ) union { sphere {,Radio*2} cylinder {<-100,posY,posZ>, <100,posY,posZ>,Radio pigment {Green}} cylinder {, ,Radio pigment {Yellow}} cylinder {, ,Radio pigment {Blue}} } #end object {EJES (.05,0,0,0)} // ---------------------------------------- // MACRO INTERNA PARA SER LLAMADA DESDE CUBO_CITY #macro cuboX (X_Cubos,r_seed1,r_seed2) #local P1 = seed (r_seed2) ; // pigmentos #local D2 = seed (r_seed1) ; // distancia 2 #local D3 = seed (r_seed1) ; // distancia 2 #local S1 = seed (r_seed1) ; // scale X1 #local S2 = seed (r_seed2) ; // scale X2 #local Ss2 = seed (r_seed2) ; // scale X2 union { sphere {0.00000000001} // disruptor #local Dist = 0 ; #local X_Cubos_r = X_Cubos ; #while (X_Cubos_r>0) object { box {<-1,0,-1>,<1,2,1>} scale <1+rand(S1),1+(rand(S2)*3),1> scale <1+rand(S1),1,1> translate x*Dist pigment {colour rgb } } #local X_Cubos_r = X_Cubos_r-1 ; #local Dist = Dist + ((1+rand(D2))+(1+rand(D3)))+4 ; #end } #end // ****************************************************** #macro Cubo_City (X_Blocks,Z_Blocks,r_seed1,r_seed2) #local City = union { #local Z1 = seed (r_seed1) ; #local Z2 = seed (r_seed1) ; #local Z3 = seed (r_seed1) ; #local Dist = 0 ; sphere {0.00000000001} // disruptor #local Z_Blocks_r = Z_Blocks ; #while (Z_Blocks_r>0) #local P1 = seed (Z_Blocks_r) ; object { cuboX (X_Blocks,r_seed1,Z_Blocks_r) scale <1,1,(1+rand(Z1))> translate z*Dist pigment {White} } #local Z_Blocks_r = Z_Blocks_r-1 ; #local Dist = Dist + (rand(Z2)+1) + (rand(Z3)+1)+4 ; #end } City #end // ****************************************************** object {Cubo_City (2,2,2,12) // Center_Trans(Cubo_City (2,2,2,12) ,x+z) pigment {White} } // ****************************************************** #local X_Ball = 15 ; #local Z_Ball = 15 ; #local X_Ball_r = X_Ball-1 ; #local Plt = sphere {<0,.5,0>,.5 pigment {White} finish{reflection 0.4}} ; #while (X_Ball_r>-1) #local Z_Ball_r=Z_Ball-1 ; #while (Z_Ball_r>-1) #local Desde = <-X_Ball_r/2,30, -Z_Ball_r/2> ; #local Hacia = <-X_Ball_r/2,-100,-Z_Ball_r/2> ; #local Sobre = trace (Cubo_City (3,1,2,12),Desde,Hacia); object { Plt translate <-X_Ball/2,0,-Z_Ball/2> translate translate y*Sobre } #local Z_Ball_r = Z_Ball_r-1 ; #end #local X_Ball_r = X_Ball_r-1 ; #end