0
$\begingroup$

So I have this equation for a circle centered at the origin that has some orientation in 3D space.

rotatedCircle[t_, \[Alpha]_, \[Beta]_] := 
 RollPitchYawMatrix[{\[Alpha], \[Beta], 0}, {1, 2, 3}].( {
    {Cos[t]},
    {Sin[t]},
    {0}
   } )

I'd like to find a circle that intersects two points on the surface of a sphere (also centered at the origin), solving for \[Alpha] and \[Beta] above (and I suppose I'd want to be able to tell it that t goes from 0 to 2 Pi). What can I use to solve this?

$\endgroup$
3
  • $\begingroup$ What is the sphere of interest? What other constraints are there? As given, there is not enough information to offer guidance. $\endgroup$ Mar 26 '20 at 0:14
  • $\begingroup$ Note that a circle is only uniquely determined by three conditions, and specifying just two points does not suffice. $\endgroup$
    – J. M.'s torpor
    Mar 26 '20 at 0:30
  • $\begingroup$ Everything is centered at the origin. I'll add that to the post $\endgroup$
    – fp.monkey
    Mar 26 '20 at 4:48
1
$\begingroup$

If both the sphere and the circle passing through two of the sphere's points have the same center, then the sphere is necessarily a great circle.

In the following example, I restrict myself to a unit sphere (scale up or down whenever appropriate):

(* two points on the sphere; one could also use RandomPoint[Sphere[], 2] *)
BlockRandom[SeedRandom["fp.monkey"]; 
            sphrpts = RandomSample[RandomVariate[CircularRealMatrixDistribution[3]], 2]];

(* roll-pitch-yaw angles *)
ang = RollPitchYawAngles[RotationMatrix[{{0, 0, 1}, Cross @@ sphrpts}], {1, 2, 3}];

Show[Graphics3D[{{Opacity[1/2], Sphere[]}, {AbsolutePointSize[6], Point[sphrpts]}}], 
     ParametricPlot3D[RollPitchYawMatrix[ang, {1, 2, 3}].{Cos[t], Sin[t], 0} // Evaluate,
                      {t, -π, π}], Boxed -> False]

sphere and great circle passing through two points

$\endgroup$
2
  • $\begingroup$ So I had previously tried a solution like this that used the cross product to find the great circle, but it fails in the case of antipodal points where the cross product is the zero vector. My hope with finding an instance of a parametric equation that solved the problem is that in that in the case of antipodal points, I could set a rotation to an arbitrary angle to get a unique solution. $\endgroup$
    – fp.monkey
    Mar 27 '20 at 22:41
  • $\begingroup$ This really is information that you should have added to your question. Indeed, infinitely many great circles pass through antipodal points, so you need another condition. What is that condition for you? $\endgroup$
    – J. M.'s torpor
    Mar 28 '20 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.