|
|
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
|
|