Math:Coordinate Systems

From GPWiki

Files:GUITutorial_warn.gif The Game Programming Wiki has moved! Files:GUITutorial_warn.gif

The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server.

However, the GPWiki forums are still active! Come say hello.

In mathematics, points in space can be represented using a few different methods. The following article hopes to explain the most common.

Contents

Coordinates in 2D

Cartesian

The Cartesian coordinate system is the most common system used to represent points in space. It is the system you are most familiar with:

The Cartesian Plane


A point in this coordinate system takes the form \langle x, y \rangle. X is the signed distance on the x-axis, and Y is the signed distance on the y-axis. For example, to traverse to the point \langle 2, 3 \rangle on the Cartesian plane, you first travel 2 units to the right, and 3 units upward:


Traverse the X-Axis Traverse the Y-Axis

Each section of the Cartesian plane has a name, the first, second, third, and fourth quadrants:

Quadrants in the Plane

Polar

Coordinates in 3D

Cartesian

Spherical

Cylindrical

Conversion between Systems

Cartesian to Polar

Cartesian to Spherical

Cartesian to Cylindrical