Find Distance Between Spherical Polar & Cartesian Points

  • Thread starter MathematicalPhysics
  • Start date
  • Tags
    Spherical
In summary, you need to square the cartesian coordinates in order to calculate the distance between two points in spherical coordinates.
  • #1
MathematicalPhysics
40
0
I have two points, one given in spherical polar coordinates and the other in cartesian coordinates. If I want to work out the distance inbetween these points do I need to convert the cartesian into spherical polars?
 
Physics news on Phys.org
  • #2
Unless you happen to be able to visualize these things in your head, then yes, writing the point in sphericals in cartesian coords would seem like a good step, especially as distance is usually calculated in terms of cartesion coordinates.
 
  • #3
the formula for the distance between two points in spherical coordinates is:

[tex]d^2=r_1^2+r_2^2-2 r_1 r_2(sin\theta_1 sin\theta_2 cos\phi_1 cos\phi_2 + sin\theta_1 sin\theta_2 sin\phi_1 sin\phi_2 + cos\theta_1 cos\theta_2)[/tex]

obviously, the cartesian formula is a lot simpler.
 
  • #4
Okay so I have point P with spherical polar coordinates
[tex](R, \theta , \phi) [/tex]
and point A with cartesian coordinates
[tex](0, 0, a)[/tex]

so A is just the z axis with length a? so in spherical polars:

A is [tex] (a, 0, 0) [/tex] ? or maybe [tex] (a, \theta, \phi) [/tex] ?

Im getting confused!
 
  • #5
With [tex]\theta[/tex] being the angle in the horizontal plane, whereas [tex]\phi[/tex] the angle to the z-axis, a given point at distance abs(a) ("a" itself either positive or negative) on the z-axis has the polar representation:
[tex](abs(a),\theta,\frac{\pi}{2}(1-sign(a))[/tex]
where sign(a) is 1 when a is positive or -1 when a is negative.
 
  • #6
Thanks, I've now worked out:

[tex] x = r\sin\theta\cos\phi , y = r\sin\theta\sin\phi, z = r\cos\theta [/tex]

I'll see how far I can get now!
 
  • #7
Note:
In your notation, the angles are interchanged from how I've used them!
 
  • #8
Yeah, sorry forgot to mention that I had interchanged them.

So now I have two points in cartesian coordinates:

P [tex] (R\sin\theta\cos\theta , R\sin\theta\sin\phi , R\cos\theta) [/tex]

A [tex] (0, 0, a) [/tex]

In order to work out the distance AP do I need to square that awful looking thing?!
 
  • #9
Yep, that's what you need to do.
 
  • #10
Okay so I need:

[tex] (R\sin\theta\cos\phi)^2 + (R\sin\theta\sin\phi)^2 + (R\cos\theta)^2 [/tex]

How can I simplify this? In a book I have it just sets a "similar" expression equal to 1 with no intermediate steps:

[tex] (\sin\theta\cos\phi)^2 + (\sin\theta\sin\phi)^2 + (\cos\theta)^2 = 1[/tex]

Also this has no 'R' in it.

edit: sorry had theta where there should have been phi
 
Last edited:
  • #11
MathematicalPhysics said:
Okay so I need:

[tex] (R\sin\theta\cos\phi)^2 + (R\sin\theta\sin\phi)^2 + (R\cos\theta)^2 [/tex]

How can I simplify this? In a book I have it just sets a "similar" expression equal to 1 with no intermediate steps:

[tex] (\sin\theta\cos\phi)^2 + (\sin\theta\sin\phi)^2 + (\cos\theta)^2 = 1[/tex]

Also this has no 'R' in it.

edit: sorry had theta where there should have been phi

Did you notice that
[tex] (R\sin\theta\cos\phi)^2 + (R\sin\theta\sin\phi)^2 + (R\cos\theta)^2 [/tex]
[tex] =R^2(\sin\theta\cos\phi)^2 + R^2(\sin\theta\sin\phi)^2 + R^2(\cos\theta)^2 [/tex]
[tex] = R^2((\sin\theta\cos\phi)^2 + (\sin\theta\sin\phi)^2 + (\cos\theta)^2 [/tex])
?
 
  • #12
Yeah, I've got the distance AP to be

[tex](R^2 - 2aR\cos\theta + a^2)^(1/2)[/tex]

which I think is correct?

Now writing the triple integral of AP over the sphere R less than or equal to a in terms of spherical polar coords gives:

[tex]\iiint {\sqrt(R^2 - 2aR\cos\theta + a^2)} R^2 \sin\theta\,dR\,d\theta\,d\phi[/tex]

with the integration over R between 0 and a
the integration over [tex] \theta [/tex] between 0 and pi
the integration over [tex] \phi [/tex] between 0 and 2pi

correct so far?
 

FAQ: Find Distance Between Spherical Polar & Cartesian Points

What is the formula for finding the distance between spherical polar and Cartesian points?

The distance between two points in spherical coordinates can be found using the formula:
d = √(r₁² + r₂² - 2r₁r₂(cos θ₁cos θ₂ + sin θ₁sin θ₂cos(φ₁ - φ₂)))
where r₁, θ₁, and φ₁ are the coordinates of the first point in spherical coordinates and r₂, θ₂, and φ₂ are the coordinates of the second point in spherical coordinates.

Can the distance between spherical polar and Cartesian points be negative?

No, the distance between two points cannot be negative. The distance is always a positive value.

Can I use the Pythagorean theorem to find the distance between spherical polar and Cartesian points?

No, the Pythagorean theorem only applies to right triangles in Cartesian coordinates. The formula for finding the distance between spherical polar and Cartesian points takes into account the curvature of the spherical surface.

How do I convert between spherical polar and Cartesian coordinates?

To convert from spherical polar coordinates (r, θ, φ) to Cartesian coordinates (x, y, z), you can use the following equations:
x = r sin θ cos φ
y = r sin θ sin φ
z = r cos θ
To convert from Cartesian coordinates (x, y, z) to spherical polar coordinates (r, θ, φ), you can use the following equations:
r = √(x² + y² + z²)
θ = cos⁻¹(z/r)
φ = tan⁻¹(y/x)

Can I use the distance formula for finding the distance between any two points in spherical polar and Cartesian coordinates?

Yes, the distance formula can be used for any two points in spherical polar and Cartesian coordinates. However, it is important to remember that the coordinates must be in the same coordinate system for the formula to work.

Back
Top