DGS Studio

Spherical Coordinates

Rippled Sphere

A sphere rippled around the azimuth.

The surface is given by rho = 1 + 0.15*sin(8*theta). In this rho notation, phi runs from 0 to π and is measured from the positive z-axis, while theta runs from 0 to 2π around z.

The conversion is x = ρ sin(phi) cos(theta), y = ρ sin(phi) sin(theta), z = ρ cos(phi). A constant ρ is a sphere. Adding a wave in theta or phi ripples that sphere. This angle order is not the order used by the spherical(r, theta, phi) command.

Equation

rho = 1 + 0.15*sin(8*theta)

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