Safer vectors

Have just been working on making vector drawing a bit safer, thanks to prompting from Matt.  Still no resize or zoom, but this drawing with 14,000 commands has just finished successfully.

Map drawing

This SVG was one that used to send the machine into a mad spinning fit, off searching for a coordinate it could never reach.  Well, now the machine will only attempt to draw to points that it believes fall within its own machine space, and it superstitiously avoids any 0 coordinate.  There are a couple of changes to the embedded (server, firmware, whatever you like to call it) software to support that, and there is a slightly new acceleration behaviour for C17 (draw straight line) commands.  This essentially turns off acceleration for C17.  Because the line is chopped into such small pieces with C17, it doesn’t work anyway, so doing without makes for a much faster line, at the expense of noise, maybe a bit of wobble.  It’s a slightly harsher process.

Ok, so those are the updates to the machine code, not completely essential, but it can be found, as usual in the repository.

The controller has a couple of minor changes to support vector drawing, mainly that only vertices that fall on the page are sent to be drawn.  I know it makes sense to have the select area tool able to select the lines to draw, but that’s all a bit tied up with bitmaps and regenerating the density maps to do that easily at the moment.  In future though, definitely, along with svg resizing and moving.

The controller now has a separate window to select the pixel rendering options, and choose which corner you want the drawing to start from.

The other change in the controller is that it now supports the new Arduino MEGA firmware, and the few new features that are available in that (namely saving to / drawing from SD cards).  It recognises what kind of board you have plugged in because the mega version broadcasts its nature in its READY shoutout.  Shouldn’t make any difference to anyone because standard behaviour is the same.  I’ve noticed an oddity with the way the control panel wraps when it detects the machine has changed to a different type, but nothing problematic.

Available from the repo, or the downloads section, v1.1.2.

6 thoughts on “Safer vectors

  1. You are amazing. I’m drawing my 3rd TSP art now. It’s working great. Thank you for all the time and effort you put into this.

  2. Hi Sandy,

    I am just waiting for my 3d printed gears to arrive from Ponoko. They sent me an email that they are in the mail. I wanted to get your latest version of code up and running.

    I downloaded polargraphcontroller 1.1.2 from the code repository. It runs great

    My question to you is, where do I get the sketch to load onto my Arduino, that talks to the controller? I’m guessing the ‘controller’ is the software that runs on the PC, and ‘server’ is the sketch that runs on the Arduino?

    I have a file called “polargraph_server_a1.ino” on my machine from an older version of your software. Is that the correct version sketch to work with controller 1.1.2?

    Thank you!

    • Exactly Bob, the server is the firmware for the arduino. Also referred to as the embedded code. The most recent version can always be got directly from the code repository at You do need to download the two libraries: AFMotor and AccelStepper, there’s links on, but otherwise it’s straightforward to update the arduino code. It doesn’t need to be done often, but it’s a good idea to be able to do it.

      • Thanks Sandy,

        I know I needed to download the two libraries when running everything ‘manually’ via Processing. Do I still need to download the two libraries when running your pre-compiled binaries? ie…’polargraphcontroller 1.1.2 windows 32′?

        If so, where do I need to put the library files for the pre-compiled binaries? Would it be in:
        polargraphcontroller 1.1.2 windows 32\lib ?

        Thanks you, sorry I still am learning about Processing and how its files are used.

        • The processing code and the arduino code are entirely separate beasts, there is no shared code or anything between the two.

          The controller (Processing) code needs geomerative and controlp5, but you _don’t_ need those if you are using the precompiled binaries.

          The server (arduino) code requires the AFMotor and AccelStepper libaries. There isn’t any precompiled version of the server code. Those libraries will need to be put into your Arduino1.0/libraries folder.

Comments are closed.