Archive for May 7th, 2015

HP 7475A Plotter: Chiplotle Supershape

In this day and age, a pen plotter isn’t going to be doing anything useful, because we have better ways to draw schematics and make presentation graphics, but it can produce Algorithmic Art:

HP 7475A - Chiplotle Supershape plotting

HP 7475A – Chiplotle Supershape plotting

Well, granted, that’s a rather small value of Art, but it does show that the plotter can draw 10 k points using serial port hardware handshaking.

That’s one of an infinite variety of Supershapes produced by the Chiplotle geometry.shapes.supershape() function:

from chiplotle import *
import math

The plotter uses absolute plotter units that range from (0,0) to (10365,7962). Telling the plotter to put its origin in the middle of the page makes perfect sense, because that automagically centers the figure.

Dialing the speed back to 5 cm/s works much better with the Sakura pens than the default 38.1 cm/s = 15.0 inch/s; hand-drawing pens just don’t have the flow rate for prolonged vigorous scribbling. HP was obviously on the edge of converting to metric engineering units in the early 1980s, with the HP 7475A designed before the transition and shipped afterward.

The supershape parameters:

  • 3900,3900 sets the maximum coordinate value along each axis. The plot may or may not exceed that value, depending on how weird the supershape turns out, but it’s generally pretty close
  • 5.3,0.4,1,1 correspond to coefficients m, n1, n2, n3
  • By default, a=1 and b=1, but you can change those as you like
  • point_count=10*1000 sets how many total points appear in the plot
  • travel=10*2*math.pi sets the number of complete cycles, in units of 2π

The function spits out a list of Cartesian XY coordinates, not the polar rΦ coordinates you might expect.

Slightly non-integer values, particularly for m, produce more interesting patterns. Other than that, there’s just no telling.

Use io.view(ss) to get an idea of what you got, it’s much faster than plotting!

Chiplotle Supershape preview

Chiplotle Supershape preview

You may find the online superformula explorers better suited to rapid prototyping, though. There’s a list at the bottom of the Wikipedia article, although some links seem defunct.

Notice that the end of the plot doesn’t quite reach the beginning over on the far right, which is a consequence of how Python produces sequences. Adding one more point does the trick:

Chiplotle Supershape preview - closed

Chiplotle Supershape preview – closed

I’ll try remembering that the next time around…