POV-Ray : Newsgroups : povray.advanced-users : Random points on surface of an object : Re: Random points on surface of an object Server Time
6 Oct 2024 13:57:31 EDT (-0400)
  Re: Random points on surface of an object  
From: Christian Froeschlin
Date: 22 Jan 2007 18:59:34
Message: <45b54fe6$1@news.povray.org>
Tim Attwood wrote:

> Basically, you just check that the distance
> from a random point in the bounding to
> a trace hit on the object is shorter than
> some threshold distance. That way the
> random distribution approaches that of
> the surface.

brute force but should be a reasonable approximation if you
are willing to wait a bit for all those missing rolls.

Although I think you should also pick a uniform distribution
of trace directions, otherwise you will have some unnecessary
systematic error. But this can be fixed by

http://mathworld.wolfram.com/SpherePointPicking.html

Also, the bounding box should be extended by "threshold",
else areas at the border only have 50% chance of hitting.


Post a reply to this message

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