Spherical and cylindrical coordinates

Dynagraph's default coordinates are Cartesian, but it also knows about the spherical and two different cylindrical coordinates system.

Spherical coordinates

The command:

    plot3d(r, s=a..b, t=c..d, coords=spherical);

plots the expression r=r(s,t) as the radius (distance from the origin) in spherical coordinates where s is the longitude and t is the co-latitude, i.e., the angular distance from the north pole.

Example: (a hemisphere)

    > plot3d( 1, s=0..2*Pi, t=0..Pi/2, coords=spherical);

Parametric plots in spherical coordinates

The command

    plot3d([r,s,t], u=a..b, v=c..d, coords=spherical);

plots a parametric surface where the spherical radius r, the longitude s, and the co-latitude t, are functions of parameters u, v.

Cylindrical coordinates

The command

    plot3d(r, t=a..b, z=c..d, coords=cylindrical);

plots the expression r=r(t,z) as the polar radius (radial distance within the x-y plane) in cylindrical coordinates, where t is the polar angle and z is the height above the x-y plane.

Example: (a cylinder)

    > plot3d( 1, t=0..2*Pi, z=0..1, coords=cylindrical);

Parametric plots in cylindrical coordinates

The command

    plot3d([r,t,z], u=a..b, v=c..d, coords=cylindrical);

plots a parametric surface where the cylindrical radius r, the polar angle t, and the height z, are functions of parameters u, v.

Z_Cylindrical coordinates

The command

    plot3d(z, r=a..b, t=c..d, coords=z_cylindrical);

plots the expression z=z(r,t) as the height above the x-y plane, as a function of the the polar radius r and polar angle t.

Example: (a paraboloid)

    > plot3d( r^2, r=0..1, t=0..2*Pi, coords=z_cylindrical);

Parametric plots in z_cylindrical coordinates

The command

    plot3d([r,t,z], u=a..b, v=c..d, coords=z_cylindrical);

is equivalent to the same command with coords=cylindrical.

Example: (the Mobius strip)

    > plot3d( [ 1+v*cos(t/2), t, v*sin(t/2) ],
         t=0..2*Pi, v=-1/4..1/4, grid=[100,3], coords=z_cylindrical);
Back to table of contents