Function Repository Resource:

SphericalCircumcircle

Source Notebook

Generate the circumcircle of a spherical triangle

Contributed by: Jan Mangaldan

ResourceFunction["SphericalCircumcircle"][{p1,p2,p3}]

returns a BSplineCurve representing the circumcircle of the spherical triangle with corner points p1,p2, and p3.

ResourceFunction["SphericalCircumcircle"][{p1,p2,p3},property]

gives the value of the specified property.

Details

The points pi are taken to be unit vectors (i.e., on a unit sphere centered at the origin).
The following properties are supported:
"Association"association containing the circumcircle, circumcenter and circumradius
"Center"center of the circumcircle (in Cartesian coordinates)
"Circle"BSplineCurve representing the circumcircle
"Radius"circumradius (spherical distance)

Examples

Basic Examples (3) 

Generate the vertices of a spherical triangle:

In[1]:=
tri = RandomPoint[Sphere[], 3]
Out[1]=

Show the circumcircle as a BSplineCurve object:

In[2]:=
ResourceFunction["SphericalCircumcircle"][tri]
Out[2]=

Visualize the spherical triangle and its circumcircle together:

In[3]:=
Graphics3D[{Sphere[],
  {Directive[Red, AbsolutePointSize[8]], Point[tri]},
  {FaceForm[], ResourceFunction["SphericalPolygon"][tri, "EdgeStyle" -> Directive[Red, AbsoluteThickness[3]], "ShowEdges" -> True]}, {Directive[AbsoluteThickness[2], Blue], ResourceFunction["SphericalCircumcircle"][tri]}},
 Boxed -> False, ViewPoint -> {-2.4, 1.3, -2.}]
Out[3]=

Scope (2) 

Generate the vertices of a spherical triangle:

In[4]:=
tri = RandomPoint[Sphere[], 3]
Out[209]=

Return the circumcenter and circumradius:

In[210]:=
ResourceFunction["SphericalCircumcircle"][tri, "Center"]
Out[210]=
In[211]:=
ResourceFunction["SphericalCircumcircle"][tri, "Radius"]
Out[211]=

Version History

  • 1.0.0 – 15 July 2022

Related Resources

License Information