# What are the advantages/disadvantages of using a polar coordinate system in a video game? [closed]

Would it ever be a good idea to represent an object's position as a magnitude at some angle relative to a reference point, instead of the typical x, y, z coordinates?

What sort of effect would it have on performance?

Clearly there are many disadvantages to this, such as having to convert into x, y, z coordinates when rendering, and possibly suffering from gimbal lock, but would there ever be a circumstance where it would be a better solution to use polar coordinates?

• You may want to elaborate more. – Lysol Mar 12 '14 at 17:52
• The advantages and disadvantages will really depend on the problem you are solving, use the coordinate system that best fits the problem. Gimbal lock is not directly related to polar coordinates. Converting into x,y,z is not a problem if using polar coordinates makes the original problem much more trivial to solve. – concept3d Mar 12 '14 at 18:47

Polar coordinates are a non Euclidean coordinate system. This means that lines created in this coordinate system are not straight, so it isn't usually used as the primary coordinate system in a game, but rather are used in conjunction with standard Cartesian coordinates when there is a use for Polar coordinates.

One common usage of polar coordinates, is positioning objects around each other. This can be used to make an object orbit around another object.

### Polar coordinates in 3D:

Polar coordinates can also be used in three-dimensional games. Except they are not called polar coordinates in 3D, they are called "Spherical coordinates". Spherical are used for basically the same thing that they are used for in 2D, except they can have an additional usage.

Image from Wikipedia: Original Wiki page.

The difference between Polar and Spherical coordinates, is that Spherical coordinates also have a Φ (Phi) component in addition to the θ (Theta) and r (radius) components.