Hi,
I would like to know what kind of maths is involved in drawing using the plotter. How does the software know what the coordinates are and when to lift or draw with the pen.
Thx
Saleem
Hi,
I would like to know what kind of maths is involved in drawing using the plotter. How does the software know what the coordinates are and when to lift or draw with the pen.
Thx
Saleem
Hi Saleemq,
You may refer to our souce code of the firmware for our XY plotter on our Github page: https://github.com/Makeblock-official/XY-Plotter-2.0
You have two independent (stepper) motors which the Arduino makes turn. So many turns means a linear motion of so many millimeters.
This is just an example, the numbers are guesses, but it will give you an idea:
12 turns on X motor = move 100mm right
24 turns on Y motor = move 200mm upwards
You normally start with the motors in a corner considered 0,0. So moving the motors 12 and 24 turns will put the pen at 100, 200.
THAT is not the problem. The problem is moving the pen in a line. For that a Digital Difference Algorithm (or Analyser) is used. These were invented for drawing lines in computer graphics, but are used in your plotter for moving the pen along the line.
Look up DDA computer graphics in google.
For