DGS Studio

Spherical Triangles

Octant Triangle

spherical_triangle((x1, y1, z1), (x2, y2, z2), (x3, y3, z3)) on a sphere centered at the origin. R defaults to 1. A=(1,0,0), B=(0,1,0), C=(0,0,1): each angle is pi/2 and the area is pi/2.

The octant triangle uses A = (1, 0, 0), B = (0, 1, 0), and C = (0, 0, 1) on the unit sphere. Each side is a quarter of a great circle, and each angle is π/2.

Girard's theorem says the area is R²(α + β + γ − π). Here R = 1 and the angle excess is π/2, so the area is π/2. Points that are not already on the sphere are scaled onto it. An optional last number would be a different radius.

Equation

spherical_triangle((1,0,0), (0,1,0), (0,0,1))

Which spherical convention this uses

DGS has two spherical notations, and they do not use the angles in the same order. The command spherical(r, theta, phi) measures theta down from the positive z-axis and phi around from the positive x-axis. The rho = f(theta, phi) graphs use phi as the polar angle and theta as the azimuth.

Keeping those conventions apart is the main thing this group teaches. A point command places one dot and prints the conversion. A rho equation sweeps a whole surface. A spherical triangle then measures angles and area on the sphere with Girard's theorem.

Reading the input

Try a change

Generate Graph posts the expression to the studio graph engine and draws the result on the homepage. The editable field is the entire input, including every line.

Edit and generate

Generate Graph opens the studio homepage and runs this field. Open in DGS Studio loads the same text and waits for you to generate it. The equation is sent once, as a query parameter.

Related examples