G-code is used in a lot of automated manufacturing processes. For example, CNC machines and 3D printers use G-code to make parts. Programming arcs and linear movement in G-code can be a little tricky. I've noticed that there aren't many sources on the internet that address this topic. So, I decided to make my own guide. I will be presenting basics steps and tips in programming arcs and linear movement in G-code. This will only include movement on a 2D plane and is designed to give a general overview of programming. The instructable will not take into account material properties, tool diameter, speeds, and feeds. I do encourage you to do all the calculations yourself as you go through my instructable. This will give you a better understanding of the code and remember a tool can become a crutch. Don't forget to use the tool path dimenisions .pdf as a reference.


- Paper
- Writing Utensil
- Scientific Calculator
- .pdf file of supplied technical drawing
-Time-approximately 60 min


Absolute- A series of numerical positions that are calculated from a fixed point of origin.
Clearance Plane- A plane designated for safe tool travel in between cutting functions.
End point-The point where an arc ends
F variable- Feed rate (inches per minute)
G00- Rapid linear movement
G01- Linear interpolation
G02- Clockwise circular interpolation
G03- Counter Clockwise circular interpolation
I variable- Incremental coordinate used to define a point in the X direction.
Incremental- A series of numerical positions that is referenced from a previous position and is independent of absolute origin.
IPM-A unit of velocity used to determine feed rate. (inches per minute)
J variable- Incremental coordinate used to define a coordinate in the Y direction. 
Origin- The fixed, central point in the Cartesian coordinate system. The origin has a numerical value of zero.
Start point- The point where an arc begins.
X variable- Absolute coordinate used to define a point in the X direction.
Y variable- Absolute coordinate used to define a point in the Y direction.


1) Xs=Xc+(R*cos(Theta1))
2) Ys=Yc+(R*sin(Theta1))
3) Xe=Xc+(R*cos(Theta2))
4) Ye=Yc+(R*sin(Theta2))
5) I=(Xc-(R*cos(Theta1)))-Xc
6) J=(Yc-(R*sin(Theta1)))-Yc 

Step 1: Program Requirements

Before we begin, I will be designating a few requirements for the program. All units are in United States customary units. Z=0 will be the top face of the part. A clearance plane of .5000" will be used and a feed rate of 20 IPM. A depth cut of .1250" will also be needed.

The next few slides will be addressing the general structure of g-code commands we'll be using.
<p>It's very interesting.</p><p>But my own challenge is when we do not know the R (radius) of the arc.</p><p>For example, I have bezier curve and I want to translate it to G code. I might be able to use the G code tool, but I want to know the idea behind it.</p><p>Is there a way to calculate and get the G code from the attached bezier curve?</p><p>Thanks</p><p>Anjaz</p>

About This Instructable