Hello people,(adsbygoogle = window.adsbygoogle || []).push({});

I'm creating an algorithm on Matlab and need to find the distance between two points in spherical coordinates where I have (r1,theta1,phi1) for the first point and (r2,theta2,phi2) for the second point.

Of course, since I'm programming, I shouldn't use the dummy Cartesian coordinates distance rule because it'll consume the processor for some dummy math! I could think that the problem can be reduced to calculating the angle between the position vectors of these two points, then it'll become very simple because we can then use the law of cosines and find the distance between the 2 points with the modified Pythagorean.

Is there a way to calculate that angle? the angle between the two position vectors of the two points.

Any other proposals are welcome :-)

Thank you in advance, for anything, even just for reading :D

**Physics Forums - The Fusion of Science and Community**

# Distance between 2 points in spherical coordinates

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

Have something to add?

- Similar discussions for: Distance between 2 points in spherical coordinates

Loading...

**Physics Forums - The Fusion of Science and Community**