# transformation from cartesian coordinates to spherical coordinates without calculations

Given this graph in the 3d cartesian coordinates i should figure out the spherical coordinates representation but without the use of calculations . I've been trying to solve this the whole day but i don't seem to get it and i've searched on all around the internet also no results . I'll appreciate any help if anyone has an idea about the topic . NOTE: this is not a homework :)

• I don't quite understand this question. The "spherical coordinates representation" of what? And what does "without calculations" mean here? Are you just supposed to draw the sphere on the left side into polar space on the right side? Ultimately, though, I'm not even sure this question is particularly computer graphics related to begin with. It seems more like a general mathematical question. Feb 12, 2019 at 19:00
• Your question is not clear, however I believe that this image will help you: en.wikipedia.org/wiki/Spherical_coordinate_system#/media/… In cartesian coordinates you represent a point, by its offset along $x,y,z$ in spherical coordinates you represent a point in terms of 2 angles and a length. The equations that you do not want to use are what actually links these two. Feb 12, 2019 at 19:36
• I believe the question is what would be the 3d shape of the equivalent sphere on the left, if the coordinates where R/theta/phi instead of XYZ. Probably without calculation means coming up with the shape intuitively. The answer is pretty easy, it looks like a curved sheet from 0,[0-360],0 to 2r,[0-360],90. You can think of it like this: the sphere is a bunch of circles around Z. They start at R=0,phi=0 and go to R=2r,phi=90. Each complete circle around Z is a line from theta=0 to theta=360. So, bunch of circles translates to bunch of lines. We have the start/end, and you can guess the curve. Feb 13, 2019 at 5:24

If we take some ring around the sphere such that $$\theta=const$$, we can see that such a ring transforms into a line on the polar space.

Converting every possible ring to the polar space gives the desired surface. However this would involve computing many different values to get an approximation or doing some algebra, which we don't want. (I'm assuming you want to keep mathematical notation to a minimum here). However we can get a pretty close idea by figuring out just a few easy to compute values.

Now. If we grab the ring that goes around the center of the sphere and transform that one, it is clear that it ends up as a line with $$\theta=45^o$$ and $$r=\sqrt{2}R$$ (that is because its vertical distance from the origin equals its horizontal distance at every point).

There are two more rings that are useful to us here: the two very small rings around the poles of the sphere.

The ring around the bottom pole transforms into a line with $$\theta=90^o$$ and $$r=0$$.

The ring around the top pole transforms into a line with $$\theta=0^o$$ and $$r=2R$$.

We now have three lines through which we can fit our surface. You can do this with pen and paper. I'm not quite sure of what kind of curve you end up with (I haven't done the algebra haha) but my guess would be some kind of sideways parabola.

EDIT: I did the math, $$r=2R\cos(\theta)$$

NOTE: I measure my $$\theta$$ as the angle between some line crossing the origin and the Z axis

I am still not sure whether this is what you actually want, but here's how to derive it mathematically. The equation of a sphere with center $$(c_x, c_y, c_z)$$ and radius $$\rho$$ is: $$(x-c_x)^2 + (y-c_y)^2 +(z-c_z)^2 =\rho^2$$ From the first image we can figure out that the sphere has center $$(0,0,\rho)$$, we also use the spherical coordinates substitution: $$x=r\cos\phi\sin\theta, y=r\sin\phi\sin\theta, z =r\cos\theta$$ Substituting yields: $$(r\cos\phi\sin\theta - 0)^2 + (r\sin\phi\sin\theta-0)^2 + (r\cos\theta-\rho)^2 = \rho^2$$ $$r(r-2\rho\cos\theta) = 0$$ The roots to the last equation are $$r=0, r=2\rho\cos\theta, \theta\in [0, \pi/2]$$, we can drop the $$0$$ since it is covered for $$\theta = \pi/2$$. Also $$\theta$$ being in $$[0, \pi/2]$$ restricts the sphere to being above the $$xy$$ plane, whereas using the full range: $$[0,\pi]$$ would produce also a sphere below. Thus you get the offset sphere in spherical coordinates: $$S=\{(r,\theta,\phi) : r=2\rho\cos\theta, \theta\in [0, \pi/2], \phi \in [0,2\pi]\}$$ If you want the ball and not only its boundary, then use $$r\in [0,2\rho\cos\theta]$$ rather than $$r=2\rho\cos\theta$$.