POV-Ray : Newsgroups : povray.advanced-users : Random rotation don't work ? : Random rotation don't work ? Server Time
29 Jul 2024 14:13:49 EDT (-0400)
  Random rotation don't work ?  
From:  Light Beam 
Date: 6 Mar 2002 07:20:40
Message: <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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.