Coordinate Systems

There are many different coordinate systems!

The most common is cartesian coordinates, where we plot a point by how far along and up:

graph with point (12,5)

Then there are polar coordinates, which use distance and angle:

coordinates polar 13 at 22.6 degrees

Polar and Cartesian coordinates work well together, sometimes we can solve things easier in one system than another, and it is easy to convert between them.

The elements of a Matrix also have coordinates, but they don't relate well to cartesian coordinates, sadly:

matrix notation

And when doing computer graphics the coordinates are different again! Let's dive in further.

Cartesian Coordinates

Cartesian coordinates start with the concept of a number line. There is a zero point and values increase to the right:

x axis The left-right (horizontal) direction is commonly called X.

That seems natural as we write from the left to the right (possibly so right-handed people can more easily see what they have just written, also seems be true when chiselling!)

y axis

We also want to go up or down, and up seems better as positive, yes?

Combine them on a graph ...

x y axes

... and we are ready to go

Matrix Coordinates

But matrices use a different system, we put the row number (which is the up-down direction) first, then the left-right direction. Oh help me!

And we don't start at (0,0), we start at (1,1)

matrix notation

Screen Coordinates

Computer screen coordinates are very similar to cartesian coordinates, but we start at the top and values increase as we move down the screen.

Screen coordinates

So drawing a function graph on a computer screen can be confusing: if we want the bottom corner of the graph to be 300 px from the top of the screen, we have to use (x,300-y) to plot any point.

So ... perfectly good reasons for each system ... but it would be nice if they were the same.

Angles

images/clockwise.js?mode=counter

With polar coordinates the angle starts along the x-axis and increases counterclockwise (opposite to how clocks go)

polar example

Angles from a line are also measured counterclockwise (and a negative angle goes clockwise):

But with Compass Bearings we start along the y-axis and go in the clockwise direction.

Three-Figure Bearings examples

Clock hands go clockwise, taps are closed clockwise, screws are tightened clockwise, compass bearings go clockwise.

But angles are measured counterclockwise.

Why Different?

Just life I suppose. See Math vs Maths ... and more.

It is important you know all this, so you don't think you are going crazy when you find your ups and downs being reversed in direction, or order!