|
![](/i/fill.gif) |
rand produces numbers between 0 and 1 so you are basically rotating between
0 and 1 degree.
Try this:
rotate<rand(R1)*360, rand(R1)*360, rand(R1)*360>
"_Light_Beam_" <fac### [at] aol com> wrote in message
news:3c860998@news.povray.org...
> I'm trying to make random rotation of random placed box.... the random
> fonction works with" translate" but rotate doesn't seem to work... why ?
> The code :
>
> // Essai sur les macros...
>
> #declare kub = box {<-0.1, -0.1, -0.1><0.1, 0.1, 0.1>
> texture {
> pigment {color rgb <0.5, 0.0, 0.5>}
> finish {ambient 0.3
> diffuse 0.5
> reflection {0.0, 1 fresnel on}}
> }
> }
>
> light_source {
> <10, 5, -10>
> color rgb 1
> }
>
> #declare R1 = seed(360);
> // 1 unit random moving
> #declare R3 = seed(1);
>
> #declare i = 0;
> #while (i < 2001)
> object {kub translate <rand(R3), rand(R3), rand(R3)> rotate <rand(R1),
> rand(R1), rand(R1)>}
> #declare i = i + 1;
> #end
>
> camera {
> location <3, 0, 0>
> look_at <0, 0, 0>
> }
>
>
>
Post a reply to this message
|
![](/i/fill.gif) |