I Convert from rectangular to Spherical Coordinates

1. Oct 5, 2017

Philosophaie

How do you convert this to Spherical Components?

Spherical Convention = (radial, azimuthal, polar)

$\vec r = |\vec r| * \cos{(\theta)} * \sin{(\phi)} * \hat x +|\vec r| * \sin{(\theta)} * \sin{(\phi)} * \hat y +|\vec r| * \cos{(\phi)} * \hat z$

Is this correct?

$\vec r =\sqrt{(x^2 + y^2 + z^2)} * \hat r + \arctan{(\frac{y}{x})} * \hat \theta + \arccos{(\frac{z}{r})} * \hat \phi$

2. Oct 5, 2017

Orodruin

Staff Emeritus

3. Oct 5, 2017

Philosophaie

Cartisian Coordinates
$\vec r = x * \hat x + y * \hat y + z * \hat z$
$x = |\vec r| \cos{\theta} \sin{\phi}$
$y = |\vec r| \sin{\theta} \sin{\phi}$
$z = |\vec r| \cos{\phi}$
Spherical Coordinates
$r = \sqrt{(x^2 + y^2 + z^2)}$
$\theta = \arctan{(\frac{y}{x})}$
$\phi = \arccos{(\frac{z}{r})}$
$\vec r = r \hat r + \theta \hat \theta + \phi \hat \phi$
or is it
$\vec r = r \hat r + \frac{\theta}{r\sin{\phi}} \hat \theta +\frac{\phi}{r} \hat \phi$

4. Oct 5, 2017

Orodruin

Staff Emeritus
Neither of those is correct. You are even adding vectors with different physical dimension ... I suggest you express the Cartesian basis vectors in terms of the spherical basis vectors and start from the Cartesian expression for the position vector.

5. Oct 5, 2017

Philosophaie

What would be the expression in terms of Spherical Coordinates
$\vec r = r(x,y,z) \hat r + \theta(x,y,z) \hat \theta + \phi(x,y,z) \hat \phi$
$r(x,y,z)=?$
$\theta(x,y,z)=?$
$\phi(x,y,z)=?$

6. Oct 5, 2017

phyzguy

Why don't you try drawing it out? As you said, in Cartesian Coordinates the position vector is $\vec r = x * \hat x + y * \hat y + z * \hat z$. When you draw this out, in what direction is it pointing in spherical coordinates? How much of it is pointing along the r, θ, and φ unit vectors?

7. Oct 5, 2017

Philosophaie

If I draw it out the Spherical Coordinates are:
$r = \sqrt{(x^2 + y^2 + z^2)}$
$\theta = \arctan{(\frac{y}{x})}$
$\phi = \arccos{(\frac{z}{r})}$
$\vec r = r \hat r + \theta \hat \theta + \phi \hat \phi$
$\hat \theta$ and $\hat \phi$ are along the arcs.

8. Oct 5, 2017

phyzguy

Right. So if I decompose the Cartesian position vector into the spherical coordinate unit vectors, how much of the Cartesian position vector points along these arcs?

9. Oct 5, 2017

Philosophaie

Is correct then?

10. Oct 5, 2017

Philosophaie

$r = \sqrt{(x^2 + y^2 + z^2)}$
$\theta = \arctan{(\frac{y}{x})}$
$\phi = \arccos{(\frac{z}{r})}$
$\vec r = r \hat r + \theta \hat \theta + \phi \hat \phi$
is correct then?

11. Oct 5, 2017

phyzguy

No. You didn't answer my question.

12. Oct 5, 2017

Philosophaie

$\arctan{(\frac{y}{x})}$ points in the $\hat \theta$ direction.
$\arccos{(\frac{z}{r})}$ points in the $\hat \phi$ direction.

13. Oct 5, 2017

Orodruin

Staff Emeritus
A scalar cannot "point" in any direction. You were asked to decompose the Cartesian basis vectors into the spherical ones in post #4 and to make the drawing with the position vector relative to a point in spherical coordinates twice in posts #6 and #8. I suggest that you follow either or both of these suggestions.

14. Oct 5, 2017

Philosophaie

Uncertain how to convert x,y,z to $(\hat r, \hat \theta, \hat \theta)$. Can you give a hint?

15. Oct 5, 2017

Orodruin

Staff Emeritus
Are you familiar with how to express the spherical basis vectors in Cartesian coordinates?

16. Oct 5, 2017

Philosophaie

Look above. Post #1.

17. Oct 5, 2017

Orodruin

Staff Emeritus
You have not done so above.

18. Oct 5, 2017

phyzguy

Have you drawn out the vectors yet? If so, can you post a picture?

19. Oct 5, 2017

Staff: Mentor

$$\vec{r}=r\hat{r}$$

20. Oct 6, 2017

Philosophaie

Attached is a drawing. r is in a 3d box or x,y,z. On the xy plane starting on x-axis is $\theta$ starting on the arc is $\hat \theta$ as a unit vector. On the z-xy plane directly down from r to the xy plane. Starting from the z-axis to r to the xy plane is $\phi$ starting on the arc $\hat \phi$ as a unit vector.

Attached Files:

• SphericalFromCartesian_0001.jpg
File size:
109.8 KB
Views:
38
Last edited: Oct 6, 2017