you must implement a plotter language like HPGL
the essence comes down to
PD x1,y1 - pen down at x1, y1
PU x2,y2 - goto x2,y2 and do pen up
this generates a line from x1,y1 to x2, y2 - google for bresenham line algorithm how to implement this.
If this works you can work on circles and bezier curves which have a bit more difficult math (but only a bit).
Succes,