|
|
I want to create a dome with spheres, but it d'on't work like I want...
For this, I use :
// this scene must create a dome...
camera { // Camera StdCam
location < -5.000, -15.000, 7.000>
sky < 0.00000, 0.00000, 1.00000>
up < 0.0, 0.0, 1.0>
right < 1.35836, 0.0, 0.0>
angle 40.00000
look_at < 0, 0, 0>
}
plane {z,0 pigment {color rgb <0.5, 0.5, 1>}}
#declare sphere_point = sphere {<0,0,0>0.15
pigment {color rgb 1}
no_shadow
}
// start of the loops...
#declare h = 0;
#declare sphere_number = 12;
#while (h < 361)
object {sphere_point translate <0, 2, 0> rotate <0 , 0, h>}
#declare h = h + (360 / sphere_number);
#end
#declare h = 0;
#declare sphere_number = 8;
#while (h < 361)
object {sphere_point translate <0, 2, 0> rotate <30 ,0 , h>}
#declare h = h + (360 / sphere_number);
#end
#declare h = 0;
#declare sphere_number = 4;
#while (h < 361)
object {sphere_point translate <0, 2, 0> rotate <60 ,0 , h>}
#declare h = h + (360 / sphere_number);
#end
// end of the loops
light_source {<-5, -5, 10> color rgb 1}
The problem is that I wanted to make it in a single loop... not 3 !
like this, but it doesn't work ! why ?
// this scene must create a dome...
camera { // Camera StdCam
location < -5.000, -15.000, 7.000>
sky < 0.00000, 0.00000, 1.00000>
up < 0.0, 0.0, 1.0>
right < 1.35836, 0.0, 0.0>
angle 40.00000
look_at < 0, 0, 0>
}
plane {z,0 pigment {color rgb <0.5, 0.5, 1>}}
#declare sphere_point = sphere {<0,0,0>0.15
pigment {color rgb 1}
no_shadow
}
// start of the loop...
#declare h = 0; /* horizontal rotation */
#declare hh = 0; /* vertical rotation (half sphere) */
#declare sphere_number = 12;
#while (hh < 181)
#while (h < 361)
object {sphere_point translate <0, 2, 0> rotate <0 , hh, h>}
#declare h = h + (360 / sphere_number);
#declare hh = hh + (180 / sphere_number);
#end
#end
// end of the loop
light_source {<-5, -5, 10> color rgb 1}
I very don't understand !
Post a reply to this message
|
|