- #1
Lancelot59
- 646
- 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:
[tex]\vec{r}(u,v)=(cos(u)sin(v),sin(u)sin(v),cos(v))[/tex]
[tex]0\leq u \leq 2\pi[/tex]
[tex]0\leq v \leq \pi[/tex]
Now if I was so elevate this sphere by some arbitrary value z0, it should turn into this:
[tex]\vec{r}(u,v)=(cos(u)sin(v),sin(u)sin(v),cos(v)+Z_{0})[/tex]
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.
I have a sphere parametrically defined like so:
[tex]\vec{r}(u,v)=(cos(u)sin(v),sin(u)sin(v),cos(v))[/tex]
[tex]0\leq u \leq 2\pi[/tex]
[tex]0\leq v \leq \pi[/tex]
Now if I was so elevate this sphere by some arbitrary value z0, it should turn into this:
[tex]\vec{r}(u,v)=(cos(u)sin(v),sin(u)sin(v),cos(v)+Z_{0})[/tex]
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.