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 14:01:46 EDT (-0400)
  Re: Random points on surface of an object  
From: Tim Attwood
Date: 22 Jan 2007 22:31:34
Message: <45b58196$1@news.povray.org>
> 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

I didn't rotate 360 y and 180 relative as in polar notation,
which is what causes that common error pointed out on wolfram,
but by 360 on 3 fixed axes. The result should be uniform already?
I guess you could use Ingo's VRand_On_Sphere() from rand.inc

#local rdir = VRand_On_Sphere(rsd);

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

Oops, yep.

   #local mn = min_extent(Obj)-thresh;
   #local mx = max_extent(Obj)+thresh;


Post a reply to this message

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