Pages: [1]   Go Down
Author Topic: Illustrator toXML to drive Stepper Motor Driver?  (Read 978 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 32
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello guys, just wonder if anyone had any knowledge about using XML to control Stepper Motor Drivers?

would like to make vector image files on illustrator, export to svg files, if I am not mistaken. SVG files are easily passable XML files. Which would be turned into motor control commands for a whiteboard vertical plotter.

any help would be apprechiated, and hey it could be fun!  smiley-wink
Logged

Connecticut, US
Offline Offline
Edison Member
*
Karma: 2
Posts: 1036
Whatduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I know a fair bit about SVG (scalable vector graphics), and the only thing you'd really have to know is the algorithm to interpolate a path along a straight line, an oval, and a bezier.  You're probably going to have to just stream a single line segment at a time to the Arduino, so it can drive the steppers.  MAYBE you could fit the bezier interpolator on the Arduino, depending on how much program space it takes to drive the steppers and pen controls.

Sounds like a fun project.  What sort of frame engineering are you doing, to make a whiteboard plotter?

I used a python script to deconstruct and then animate the reconstruction of a single SVG file to produce this.  http://www.youtube.com/watch?v=mQV0nj9Cl5o
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 32
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you so much for the help, I will get reading up straight away!
(I should have stayed in school :'()
Logged

Connecticut, US
Offline Offline
Edison Member
*
Karma: 2
Posts: 1036
Whatduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This site has a number of Java applets to help in understanding many graphics-related algorithms.  I linked the first one, the most famous line-interpolating routine, called the Bresenham Line.  http://www.netgraphics.sk/bresenham-algorithm-for-a-line

There are discussions of Bezier lines, but you could do well to look up some of these things in Wikipedia also.  They might give some more gentle introduction to some parts of it, or at least links to other wiki entries to read more detail.
Logged

Pages: [1]   Go Up
Jump to: