header photo

Polargraph Controller

 

On the PC side there is a program called Controller and which is used to setup the server with the proper machine parameter and it also translates a bitmap or vector image into commands for the server.

Installation

In the package (V 1.25 in Jan.'13) there are executable programs for Linux/Max/Windows and as well the source code for Processing 1.5.1 (not 2.0). Processing is not the best environment for a GUI, but under this circumstances the controller offers a pretty decent interface.

There are four tabs for the different tasks of operation. in each tab you find on top the same four commands.

  • SAVE : Saves the setting under the current file.
  • SAVE AS : Saves the setting under a file of choice.
  • LOAD CONFIG : loads a configuration. At program start, the file default.properties.txt is load.
  • CLEAR QUEUE : Clears the current commands in the queue.

SETUP-tab

After starting the polargraphcontroller.app you first have to set the correct machine parameters.

Then connect the right serial port. If everything goes right, you see Polargraph READY! (PolargraphSD) on top of the window.

At that point it is a good idea to save your setup. We save it in the default.properties.txt, so we get all the settings right away from the start of the program.

Next you have to enable the CommandQueue so that the commands get send to the server. Once you have all the proper settings, you have to send them to the server.

This commands are related to the settings above:

  • UPLOAD MACHINE SPEC : Loads the machine specification to the server where they are stored in the EEPROM.
  • DOWNLOAD MACHINE SPEC : Reads the machine specification from the server.
  • RESET MACHINE TO FACTORY : Just what the name says.
  • MM PET REV (95) : The number of steps the motors have per revolution.
  • STEPS PER REV (400) :
  • STEP MULTIPLIER (8) : The number of microsteps for one step.
  • MACHINE WIDTH (900) : Our machine is 900 mm wide and ...
  • MACHINE HEIGHT (800) : ... has height of 880 mm.
  • PAGE WIDTH (458) : The page width in mm and ...
  • PAGE HEIGHT (610) : ... the page height in mm we want to draw.
  • PAGE POS X (220) :
  • PAGE POS Y (200) : normally the same like the HOME POS Y
  • HOME POS X (450) :
  • HOME POS Y (200) :
  • PEN TIP SIZE (0.8) :
  • CENTRE PAGE : Puts the horizontal value of the page to the center of the machine.
  • CENTRE HOME POINT : Puts the horizontal value of the home point to the center of the machine.
  • SEND TIP SIZE : Send the tip size to the server.
  • PEN TEST START TIP (0.50) : only Sandy knows ...
  • PEN TEST END TIP (2.00) : dito
  • PEN TEST INC SIZE (0.50) : dito
  • TEST PEN WIDTHS : Draws a test pattern according to the above settings at the current place of the gondola.
  • MOTOR MAX SPEED (600) : 600 is a very conservative value, so far we tried up to 5'000 and it works fine.
  • MOTOR ACCELERATION (400) : 400 is a very conservative value, so far we tried up to 5'000 and it works fine.
  • SERIAL PORT... : Opens a dialog box where you can choose the serial port (in our case this is /dev/tty.usbmodemfd371) or NO SERIAL CONNECTION if you want to work off-line.

INPUT-tab

The controller offers two ways to generate drawing commands for the server: a) it renders a pixel image or b) it reads a vector file and transforms the Cartesian coordinates into native Polargraph coordinates (i.e. length of the left and right strings which holds the gondola - which is proportional to the number of steps).

Basic commands:

  • SET HOME : First physically move the gondola so that it directly over the home point, then this command locks the motors by applying power, so they will hold the gondola. Now the server knows that the gondola is in its home position, ready to start a drawing. Does not move the gondola.
  • SET PEN POSITION : Similar like the command SET HOME, but sends an arbitrary position you clicked on the canvas to the server. Does not move the gondola.
  • MOVE PEN TO POINT : Positions directly the pen to point to the point you click on the canvas.
  • MOVE DIRECT : Draws a straight line from where the pen is to the point you click on the canvas.
  • PEN LIFT : Lift the pen from the paper.
  • PEN DROP : Drop the pen to the paper.

Commands for drawing:

  • SELECT AREA : Drag a selection box for the are to draw.
  • SET FRAME TO AREA : Adjusts the frame to the above specified area.
  • SELECT FRAME : Select the frame an shows the pixels defined below:
  • LOAD IMAGE FILE : Load JPG or PNG image.
  • MOVE IMAGE : If the image does not show up, move and resize the image until it is where you want it on the page. Click again on this button to get rid of the image glued to the cursor.
  • RESIZE IMAGE : Choose the scaling of the image.
  • BRIGHT PIXEL : The value of the brightest pixel, 255 is white.
  • DARK PIXEL : The value of the darkest pixel, 0 is black.
  • GRID SIZE : Size of the extracted pixels, >= 20.
  • SAMPLE AREA : Controls how blurred or sharpened the extracted pixels are.
  • CHOOSE MASK COLOR :
  • PIXEL SCALING : Scales the drawing pixel (defined by the grid size) up or down.
  • RENDER PIXELS : Once all the above settings are right, this opens a dialog box with various render options. Now, if the server is connected, the commands will be sent over the serial line. If no server is connected or the command queue is pause, the commands can be saved in a text file for later processing (see EXPORT QUEUE).

Drawing commands:

  • DRAW GRID OF BOX : command C07 is not implemented
  • DRAW OUTLINE BOX : draws the frame
  • DRAW OUTLINE ROWS : command C07 is not implemented
  • DRAW OUTLINE PIXELS : command C07 is not implemented

Vector commands:

  • LOAD VECTOR : Load an SVG vector graphics file.
  • RESIZE VECTOR :
  • MOVE VERCTOR :
  • SHORTEST VECTORS :
  • DRAW VECTOR : Sends the loaded SVG  to the queue.

ROVING-tab

Roving means to move around an area, somewhat autonomously. It is really nothing more than a safe, cartesian area to behave in and it’s specified as simply as dragging a box in the controller and sending it to the machine.  It is called a rove area because the machine is free to rove anywhere in it.

This commands need a machine with a Polargaph shield installed.

The Vector Sprites guide.

The Norwegian Pixels guide. Technically, there is very little difference between the norwegian pixel algortihm and the regular square wave pixel, except that the regular square pixels are much longer - they might be 50 steps long, and 50 steps wide, whereas the norwegian pixel will typically be 2 steps long and 20 steps wide, so there is 50 times more commands to draw to cover the same area.

  • SELECT AREA :
  • SET FRAME TO AREA :
  • SELECT FRAME :
  • SEND ROVING AREA :
  • START TEXT AT POINT :
  • GRID SIZE :
  • RENDER WRITING :
  • DRAW NORWEGIAN :

QUEUE-tab

Commands:

  • EXPORT QUEUE :
  • IMPORT QUEUE :
  • SIGNAL STORE ... :
  • SIGNAL PLAY :
  • EXEC FROM STORE ... :