Definition of a line between two points on a sphere

In summary: If P and Q are position vectors from the centre of a sphere (of radius R) to two points on its surface, provided the points aren't directly opposite each other, you could also write a parametric equation for a geodesic (that is: great circle segment, the shortest distance along the surface of the sphere) from point P to point Q like this\frac{\textbf{P}}{r^2}=A\left (P-Q\right )where A is a constant, and r is the radius of the sphere....In summary, you could use either the equation of a geodesic from point P to point Q,
  • #1
TravelGirl
9
0
I have two points on a sphere (x1,y1,z1) and (x2,y2,z2).
Now I want to plot a straight line over the surface of the sphere between these point.

The radius and the center of the sphere are also known.

What should be the equation of this line?
 
Physics news on Phys.org
  • #2
Welcome to PF!

Hi TravelGirl! Welcome to PF! :smile:

If you know the Cartesian coordinates of the centre of the sphere, then just define the circle with that centre that goes through those two points. :wink:
 
  • #3
Thanks Tim for your welcoming words.

I do have the Cartesian coordinates of the two points on a sphere.
Only I do not want to define a circle, but a line between these two points alon the surface of the sphere.

How do I do this?
 
  • #4
The shortest path between two points on a sphere is along the great circle on the sphere passing through them, which is what tiny-tim described
 
  • #5
Yes, I do know the great circle equation. But this gives me only the length of the line between these two points.

What equation/parameters do I use when I want to plot the line between these points?
(sorry if I don;t understand it)
 
  • #6
You could solve the geodesic equation on a sphere, but the outcome will be that the geodesic is a great circle, so we save you some time :P
 
  • #7
TravelGirl said:
Yes, I do know the great circle equation.

That is the equation you're looking for …

as Office_Shredder :smile: and haushofer :smile: say, the great circle equation is the straight line over the surface of the sphere between those two points. :smile:
But this gives me only the length of the line between these two points.

I don't understand what you mean :redface:

why doesn't your great circle equation gives you the whole circle? :confused:
 
  • #8
I am sorry that I made you confused.

But I need to plot a line between these two points.

So I need some sort of parametric equations:
x=
y=
z=

I know that the great circle distance formula can give me the length between these two points, measured along the surface.

Can you maybe help me on these parametrix equations?
 
  • #9
TravelGirl said:
… I know that the great circle distance formula …

I'm not talking about a distance formula, I'm talking about the equation of the circle.

Do you know the equation for a circle of a given radius with a given centre?
 
  • #10
Yes, this should be something like:

x=x0 +r*sin(theta)*cos(rho)
y=y0 +r*sin(theta)*sin(rho)
z=z0 +r*cos(theta)

But this is just a general circle, how do I make one which goes through my two points?
And describes the line between my two points and not the whole circle.
 
  • #11
Well, you know what r is, so for example you can choose θ = 0 to be the direction from the centre to A, and you can choose θ = π/2 to be the perpendicular direction in the plane of A B and the centre.
 
  • #12
I am starting to feel really dum, but appreciate your help very much.

Because by using constants, you get just one coordinate out of the parametric equation. So I must have understand your answer incorrectly.

How do I determine the perpendicular direction in the plane of A B and the centre?
And how do I get a range of numbers in my parametric equation?
 
  • #13
TravelGirl said:
I am starting to feel really dum, but appreciate your help very much.

Because by using constants, you get just one coordinate out of the parametric equation. So I must have understand your answer incorrectly.

How do I determine the perpendicular direction in the plane of A B and the centre?
And how do I get a range of numbers in my parametric equation?

Show us what you have so far.
 
  • #14
As it's been a few days since the last post in this thread, I hope it's okay if I suggest a couple of methods. I found the first http://mathforum.org/library/drmath/view/52070.html". It's simpler than the one I thought of, but doesn't work when the points are at opposite poles. I'm just a learner myself, so don't take these as definitive answers. There may be neater or better ways of solving it; all comments welcome.

Look away now, if you prefer not to see such a full working out.


(1) If P and Q are position vectors from the centre of a sphere (of radius R) to two points on its surface, provided the points aren't directly opposite each other, you could write a parametric equation for a geodesic (that is: great circle segment, the shortest distance along the surface of the sphere) from point P to point Q like this

[tex]\textbf{R}(t)=R\frac{\textbf{P}+t\left ( \textbf{Q}-\textbf{P} \right )}{\left \| \textbf{P}+t\left ( \textbf{Q}-\textbf{P} \right ) \right \|}[/tex]

where [itex]t \in [0,1][/itex] (that is: t runs from 0 to 1, inclusive), so that [itex]\textbf{R}(0) = \textbf{P}[/itex], and [itex]\textbf{R}(1) = \textbf{Q}[/itex].

The expression [itex]\textbf{P}+t\left ( \textbf{Q}-\textbf{P} \right)[/itex] is a parametric equation for a line segment from P to Q in Euclidean 3-space, which goes under the surface of the sphere; that's to say, a representative position vector standing for each point on the line segment. The denominator is the magnitude of that position vector. Dividing a vector by its magnitude gives a unit vector in the same direction. If we multiply this unit vector by R, the radius of sphere, we get the required position vector for a point on the surface of the sphere.

This method fails when points P and Q are on opposite sides of the sphere. Then the line connecting them goes through the centre of the circle, and there are infinitely many possible geodesics between them. To get around this, you could offset P slightly in the direction you want the geodesic to go. Or maybe someone knows a more elegant way?


(2) Alternatively, you could describe the great circle segment in terms of a unit vector in the direction of P and another unit vector at right angles to P in the plane containing P, Q and the centre of the sphere. If P and Q are not exactly opposite each other, define unit vectors thus:

[tex]\textbf{e}_1=\frac{\textbf{P}}{\left \| \textbf{P} \right \|}=\frac{\textbf{P}}{R}[/tex]

[tex]\textbf{e}_2=\frac{(\textbf{P}\times \textbf{Q})\times \textbf{P}}{\left \| (\textbf{P}\times \textbf{Q})\times \textbf{P} \right \|}[/tex]

[tex]\textbf{e}_3=\frac{\textbf{P}\times \textbf{Q}}{\left \| \textbf{P}\times \textbf{Q} \right \|} = \frac{\textbf{P}\times \textbf{Q}}{R^2 \sin ( \textbf{P},\textbf{Q} )}[/tex]

where [itex] \sin ( \textbf{P},\textbf{Q} )[/itex] is the sine of the angle from P to Q. The last of these is a unit vector normal to the plane in which the great circle lies. If P and Q are opposite each other, you can choose an arbitrary unit normal vector [itex]\textbf{e}_3[/itex], depending on which of the infinitely many great semicircles you want to describe from P to Q (the only condition is that it must be at right angles to P or Q, in other words [itex]\textbf{P} \cdot \textbf{e}_3=0[/itex]), then define the [itex] \textbf{e}_2[/itex] in terms of the others:

[tex]\textbf{e}_2=\textbf{e}_3 \times \textbf{e}_1[/tex]

In either case,

[tex]\textbf{R}(\theta)=R\left [ \left ( \cos \theta \right ) \textbf{e}_1 + \left ( \sin \theta \right ) \textbf{e}_2 \right ],[/tex]

where [itex]\theta[/itex] runs from 0 to the angle between P and Q, which we can get from the definition of the dot product:

[tex]\theta \in \left [ 0,\arccos \left ( \frac{\textbf{P} \cdot \textbf{Q}}{R^2} \right ) \right ].[/tex]

When P and Q are opposite, the direction is determined by the normal vector to the plane of rotation, [itex]\textbf{e}_3[/itex].
 
Last edited by a moderator:

FAQ: Definition of a line between two points on a sphere

What is the definition of a line between two points on a sphere?

A line between two points on a sphere is the shortest distance between those two points on the surface of the sphere. It is a geodesic, or a curve that follows the curvature of the sphere.

What is the difference between a line on a flat surface and a line on a sphere?

A line on a flat surface is straight and has a constant distance between any two points. However, a line on a sphere follows the curvature of the surface, so the distance between any two points on the line is not constant.

How is the length of a line between two points on a sphere calculated?

The length of a line between two points on a sphere is calculated using the formula for the arc length of a circle. This formula takes into account the radius of the sphere and the central angle between the two points.

Can a line between two points on a sphere be a great circle?

Yes, a great circle is a special type of geodesic that passes through the center of the sphere and divides it into two equal parts. It is the longest possible line that can be drawn on a sphere.

What is the significance of the line between two points on a sphere in navigation?

In navigation, the line between two points on a sphere is used to determine the shortest distance between two locations on the surface of the Earth. This is important for calculating travel time and fuel consumption for ships and airplanes.

Similar threads

Back
Top