|
![](/i/fill.gif) |
"serfurj" <nomail@nomail> wrote in message
news:web.45afe5111c5723b3e73422500@news.povray.org...
> "Chris B" <c_b### [at] btconnect com nospam> wrote:
>>
>> If you want a uniform distribution you probably want #declare Start =
>> vrotate ( <0,0,-2>, <asind(rand(R1)*2-1),rand(R1)*360,0> );
>
> I understand your approach, but it seems to only apply to placing objects
> on
> a sphere. Is there a way to place the cylinders uniformly on the
> sphere_sweep or cylinder shapes below? Is it possible to create a random
> distribution of points in a space within a sphere_sweep or cylinder?
>
You're right it does only apply to a sphere.
Cylinders are easy, you just rotate by rand(R1)*360 around the axis of the
cylinder and translate by rand(R1)*cylinderLength along the length of the
centre line of the cylinder.
Getting uniformly random distribution on the surface of a sphere sweep is
beyond me I'm afraid. You can define a spline that corresponds to the path
followed by the sphere sweep and take a point at a random distance along it,
then you could send out traces at right angles to the line of the spline.
This would give you a uniform random distribution on the straight sections,
but you'd still get more on the inside of the bends and less on the outside
of the bends.
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |