0

I have the following formulas to sample points uniformly on a unit sphere in 3D space:

$x = \sqrt{1-u^2} sin\phi$

$y = \sqrt{1-u^2} cos\phi$

$z = u$

where $u \in [-1,1]$ and $\phi \in [0,2\pi]$.

Now think of a plane which separates the sphere in the middle, defined by the normal vector $(0,1,0)$. If I want to sample the hemisphere over this plane I simple change the sampling interval of $\phi$ to $[0,\pi]$.

Now consider another plane defined by a normal vector $(x,y,z)$ which again separates my sphere. How can I sample the points in the hemisphere over this plane without simply rejecting the "false" ones?

Thanks

EDIT: I forgot to mention that my first idea was to calculate the points on the hemisphere at the origin over the plane with the normal $(0,1,0)$. Then I could rotate these points with matrices. The angles can be determined by comparing $(0,1,0)$ and the normal of the new plane but this seems a bit overkill...

  • The $z=z^2$ should not be there... The principle is to use a circumscribed cylinder to the sphere. More or less duplicate of http://math.stackexchange.com/q/87230 (see the solution neatly presented by leonbloy) – Jean Marie May 17 '16 at 11:32
  • See also http://mathworld.wolfram.com/SpherePointPicking.html where you will find your two first formulas (the last one $z=z^2$ has to be cancelled). – Jean Marie May 17 '16 at 11:43
  • @JeanMarie Thank you. I corrected the formular. – Mike Schweizer May 17 '16 at 13:10
  • @JeanMarie I just want to make clear that I want to make the sampling dependent on a normal vector (the one for the plane that splitts the sphere). In the discussion you have linked this is not the case. – Mike Schweizer May 17 '16 at 13:16
  • You are right . – Jean Marie May 17 '16 at 13:40

0 Answers0