POV-Ray : Newsgroups : povray.general : Asteroid Belt : Re: Asteroid Belt Server Time
31 Jul 2024 08:25:19 EDT (-0400)
  Re: Asteroid Belt  
From: Christian Froeschlin
Date: 9 Jul 2007 17:52:34
Message: <4692ae22$1@news.povray.org>
OpalPlanet wrote:

> 1) is there a way to adjust the while loop so that it generates the spheres
> inside the boundries of the cone?

the brute force method would be to create random spheres like
you do now and then only keep those which lie inside the cone.
This has the advantage that it works with any shape, and the
object pattern should help you there.

Of course, you can also parametrize the cone in such a way that
a uniform distribution in the parameter space leads to a uniform
distribution in the cone, but it may not be worth the bother ;)


Post a reply to this message

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