Parametric Sphere Projection: A Function for Projecting Points onto a Sphere

Lancelot59
Messages
640
Reaction score
1
I just want to make sure my thinking is correct with a problem I'm working on. I'm trying to write a function that will take a point on a plane above a sphere, and then project it onto that sphere. From there project the point onto the x,y plane by following the normal vector of the sphere

I have a sphere parametrically defined like so:
\vec{r}(u,v)=(cos(u)sin(v),sin(u)sin(v),cos(v))
0\leq u \leq 2\pi
0\leq v \leq \pi

Now if I was so elevate this sphere by some arbitrary value z0, it should turn into this:
\vec{r}(u,v)=(cos(u)sin(v),sin(u)sin(v),cos(v)+Z_{0})
Since the unit normal of a sphere is the same as the unit vector that defines the surface, I think this should work. Then from here I think I should just be able to scale up the vector until I reach the x,y plane. Of course my final solution will be different, as I won't be using a unit sphere to do the actual projection. I just wanted to make sure I had the right plan going.
 
Physics news on Phys.org
That's certainly the equation of the unit sphere moved up one alright. So this plane is going to project to the top half of the sphere than along the inward normal? Is the plane horizontal? Is the projection vertical? Not sure I understand exactly what you intend, but, yes, it seems like it should work.
 
LCKurtz said:
That's certainly the equation of the unit sphere moved up one alright. So this plane is going to project to the top half of the sphere than along the inward normal? Is the plane horizontal? Is the projection vertical? Not sure I understand exactly what you intend, but, yes, it seems like it should work.

The plane is above the sphere, and will project to the inside of the bottom half. From there I can derive the values of U and V from the X Y coordinates on the plane (it will have the same projection on the sphere regardless of z, as long as it's fully above it). Then I use the normal vector of the sphere, and project down to the x,y plane. I'm running the math now, I'll make a more detailed post when I've finished.
 
Back
Top