|
![](/i/fill.gif) |
"Sven Littkowski" <wrt### [at] yahoo com> wrote in message
news:web.420a2c0a5473d9f07e561af90@news.povray.org...
> Hi everyone. I need help. I have a scene in which I created an object, so
> far it works. At the end of the scene I want to create a random-generated
> number how often that object will be placed in the scene (minimum 10x,
> maximum 20x), and I also want random-generated locations (x,y,z) and
> rotation (again x, y, z axis). That I was not able to do successfully. Who
> can help me? Thanks.
>
>
Something like:
#declare Rand1 = seed(43552);
#declare ObjCount = int(rand(Rand1)*10)+10;
#declare N = 1;
#while(N<=ObjCount)
object{
cylinder{0,y*2,0.25 pigment{Red}}
rotate<rand(Rand1)*360, rand(Rand1)*360, rand(Rand1)*360>
translate<rand(Rand1)*10-5,rand(Rand1)*10-5,rand(Rand1)*10-5>
}
#declare N=N+1;
#end
Post a reply to this message
|
![](/i/fill.gif) |