A *coordinate system* in is a function
such that the restriction of to some cofinite set is a homeomorphism.

Some commonly used coordinate systems include:

The polar and spherical coordinate systems are simply special cases of the spherical coordinate system in :

Spherical coordinate systems are only defined for . To see where the spherical coordinate system gets its name, notice that , where the norm is Euclidean.

All of the mentioned coordinate systems can be united under a single generalization.
This is done by computing spherical coordinates only for the first components
of , and leaving the other components as they were. This is called the
*generalized cylinder coordinate system*. The spherical coordinate system
is obtained by setting . The cylinder coordinate system is obtained
by setting . The Cartesian coordinate system is obtained
by setting (this is of course interesting only theoretically,
since for , the conversion is just the identity function).

Pastel implements coordinate conversions so that the Cartesian coordinate system is thought of as the most natural coordinate system. For all other coordinate system Pastel offers functions to convert to Cartesian coordinates and back. This way, if there are coordinate systems, only conversion functions are needed instead of for conversions between all systems. Pastel offers conversion functions for the generalized cylinder coordinate system, as well as specialized functions for spherical and cylinder coordinate systems.

*Cartesian, cylinder, and spherical coordinate systems.*