*3D Insider is ad supported and earns money from clicks, commissions from sales, and other ways.*

Learning how to use CNC machines properly means having a solid foundation of the fundamentals. One fundamental piece of knowledge useful in general manufacturing is understanding the Cartesian coordinate system. Although simple in concept, the value of the Cartesian coordinate system in manufacturing is often understated.

What exactly is the Cartesian coordinate system and what are the rules for using it? How does it translate to how CNC machines work? Are there alternatives to the Cartesian coordinate system?

## Cartesian coordinate system – origin and basic concepts

Developed by René Descartes in the 17th century, the Cartesian coordinate system is a method for describing the location of any point in 2D or 3D space using numbers. It was revolutionary at the time as it reconciles algebra and geometry. Using Cartesian coordinates, any shape can be expressed as an algebraic equation.

The concept of the Cartesian coordinate system may seem simple, but it can be extended and analyzed for much more complex functions. Nowadays, these concepts are essential in fields such as engineering, physics, architecture, astronomy, data processing, 3D modeling, and computer graphics.

## The 2D Cartesian plane

To better understand the Cartesian coordinate system, it is good to start with a 2D plane described by X and Y axes. These are two lines that are perpendicular to each other and intersect at one point – the “origin.”

Each axis can be divided into segments of equal intervals. Anything to the right of the origin corresponds to a positive X value and anything above the origin corresponds to a positive Y value. Accordingly, there can be negative values along both the X and Y axes.

Each point in this 2D plane can then be described in terms of X and Y coordinates, similar to how each point in a map can be expressed as a latitude and longitude. It is also possible to express shapes like circles and arcs as algebraic equations, with both X and Y values acting as unknown variables.

### Cartesian coordinates in 3D space

This same concept can be extended to 3D space by adding a third axis – the Z-axis. This third axis is mutually perpendicular to both the X and Y axes. All three axes must share a common origin. Every point 3D space can then be represented in terms of X, Y, and Z coordinates.

3D shapes can also be expressed as algebraic equations. This is the foundation of modern trigonometry. Expressing a sphere or column as a mathematical equation has had huge ramifications in engineering and 3D design.

The standard depiction of the 3D Cartesian coordinate system places the XY plane along the horizontal with the Z-axis pointed towards the vertical. However, this is not an absolute rule. Depending on the application, different orientations of the Cartesian coordinate system may be more convenient. This is acceptable as long they follow the right-hand rule.

The Cartesian coordinate system is not limited only to 2D and 3D space. Points in higher dimensions can still be described as Cartesian coordinates. However, this is a high-level concept that is no longer relevant to manufacturing. Four or five-dimensional space is also beyond the perception or imagination of humans.

## The right-hand rule

The right-hand rule is an important concept in the 3D Cartesian coordinate system. It describes the proper orientation of the positive values in the X, Y, and Z axes regardless of how the coordinate system is rotated.

To use the right-hand rule, simply hold out your right hand and form an L shape with your thumb and index finger. The middle finger should then be pointed outwards and perpendicular to the palm. This should form lines that are perpendicular to each other and represent the positive directions of the X, Y, and Z axes.

The right-hand rule applies in any orientation of the 3D Cartesian coordinate system. This means you can set the Z axes in either the horizontal or vertical direction and still maintain the system’s consistency.

## How CNC machines use the Cartesian coordinate system

The Cartesian coordinate system provides a systematic way for a CNC machine to identify a point in 3D space. In almost all CNC machines, the coordinate system is used as such:

- The X coordinates govern left and right movement
- The Y coordinates govern the front to back movement
- The Z coordinates govern up and down motion

This may not always be the case. For instance, a lathe machine may set the Z-axis as the direction parallel to the axis of rotation of the workpiece. In most cases, shifting the orientation of the Cartesian coordinate system is a matter of convenience.

Cartesian coordinates make it very easy to program CNC machines to move automatically and predictably. These are integrated into a CNC machine’s G-Code, which is a list of the commands that the machine will follow based on user input.

The moving parts of CNC machines have a “home location.” This location mimics the “origin” of a Cartesian coordinate system and provides a common reference point for all movements and measurements. Periodic calibration may need to be done to make sure that this home location does not drift significantly from the original point.

Many CNC programs also allow the user to specify a home location. This customized coordinate system is called a Work Coordinate System (WCS). Picking an optimal home location can greatly speed up a CNC machining process by reducing the total distance that the tool needs to travel.

## Alternatives to the Cartesian coordinate system

The Cartesian coordinate system is not the only way to specify the location of a point in 2D or 3D space. The most common alternative to the Cartesian coordinate system is the polar coordinate system. Instead of XYZ coordinates, the polar coordinate system describes the location of a point based on its distance and angle from the origin.

Polar coordinates are more appropriate when used in applications that make use of a circular pattern. This can include milling holes or making symmetrical patterns on a lathe. Delta 3D printers come with a circular build platform that makes the use of polar coordinates quite ideal.

In 3D space, polar coordinates can be extended to cylindrical coordinates by the addition of a height dimension. Instead of XYZ coordinates, points in a polar coordinate system are described by r (radius from the origin), ϴ (angle measured from the horizontal), and z (height from the r- ϴ plane that contains the origin). When used correctly, equations that would have been complex if expressed in Cartesian coordinates can be made much simpler using polar or cylindrical coordinates.

## Final thoughts

The Cartesian coordinate system may be a few centuries old, but it is still recognized as one of the foundations of modern engineering. Fairly simple in principle, this is a system that allows us to express points and shapes in 2D or 3D space using numbers of algebraic equations.

If you’ve ever used a CNC machine before, then you probably already have an intuitive understanding of the Cartesian coordinate system. Just remember to use the right-hand rule when assigning positive and negative values to Cartesian coordinates in 3D space.