#include "colors.inc" #include "glass.inc" #include "textures.inc" #include "skies.inc" #declare PETAL_DEPTH = .3 #declare MAGIC_NUMBER_ONE = .8 #declare MAGIC_NUMBER_TWO = .5 #declare petal = union { sphere { 0 1 clipped_by { difference { plane { y 0 } plane { x 0 } } } } torus { 1 + MAGIC_NUMBER_ONE, MAGIC_NUMBER_ONE rotate <0,0,90> clipped_by { difference { sphere { -x, 1 + MAGIC_NUMBER_ONE scale <1,1,1/(1+MAGIC_NUMBER_TWO)> } plane { -y 0 } plane { -x 0 } } } } scale <1,PETAL_DEPTH,1> translate <-1,0,0> } #declare rosehead = union { #declare n = 0 #declare petals = 24 #while (n < petals) object { petal #declare scalefactor = .35+( .65* (1-(n/petals))) scale rotate <10-( (n/petals) *5),0,0> rotate <0,0,-90*( .2 + (.8* (n/petals)))> rotate <0,3.5*360*(n/petals),0> } #declare n = n + 1 #end translate PETAL_DEPTH*y pigment { color rgb <.07,.05,.7> } finish { diffuse 0.8 } } #declare thorn = cone { <0,0,0>, 1 <3,1,0>, 0 scale 0.1 } #declare rosestem = union { cylinder { <0, 0, 0>, <0, 5, 0>, 0.1 } object { thorn translate 0.5*y } object { thorn rotate 90*y translate 1.5*y } object { thorn rotate 180*y translate 2.5*y } object { thorn rotate 270*y translate 3.5*y } object { thorn translate 4.5*y } pigment {color Green} } #declare rose = union { object {rosehead translate y*5.0} object {rosestem} } object { rose } camera { location <2.5,10.5,6> look_at 3*y } #declare T_Starglass = texture { pigment {color rgbf <0.48,0.48,0.98,0.6>} finish{F_Glass3} } plane { y 0 texture { pigment {checker color rgb 1 color red .1 scale 3} finish {reflection 0.5 ambient .1} } } sphere { 0 0.5 texture {T_Starglass}} sky_sphere { S_Cloud5 } light_source { <2, 20, 15> color White area_light <5, 0, -5>, <-5, 0, 5>, 10, 10 adaptive 1 jitter }