POV-Ray : Newsgroups : povray.binaries.images : 11,000 Plastic Mouse Wheels (800 x 600, 293 KB) : Re: 11,000 Plastic Mouse Wheels (800 x 600, 293 KB) Server Time
19 Nov 2024 20:21:55 EST (-0500)
  Re: 11,000 Plastic Mouse Wheels (800 x 600, 293 KB)  
From: Trevor Quayle
Date: 9 Nov 2001 21:29:07
Message: <3bec90f3@news.povray.org>
> No, my method is:
>
> r=seed(3482) // seed values only examples!
> a=seed(2321)
>
> radius=rand(r)*2
> ang=rand(a)*360
>
> ...
>
> translate <radius*sin(ang*(pi/180)), 0, radius*cos(ang*(pi/180))>
>
> ...
hmm... several points of interest here:

1) sin(ang*(pi/180)), i realize you are converting the angle to radians for
use in the sin() function, are you aware that the function radians(ang)
would do this?

2)why convert the angle and rad to coordinates instead of doing this:
translate x*radius
rotate y*ang

or if you want the object to maintain its original rotation:

rotate -y*ang
translate x*radius
rotate y*ang

3) as others have mentioned, and from the method you are using, you should
expect a large concentration in the centre, to spread out more evenly use:

 radius=sqrt(rand(r))*2



-tgq


Post a reply to this message

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