[chiplotle-discuss] Superformula for Supershapes
vga2102 at columbia.edu
Sun Mar 14 21:30:39 EDT 2010
The idea of generalizing Chiplotle to include, say, gcode, and more abstract higher level drawing classes is certainly attractive. If we want to move in this direction I'll be important to keep the different "layers" (the hardware plotter interface, the HPGL specific code, and the high level drawing abstraction) very clearly distinct and independent. There are, certainly, many things that are HPGL and plotter specific. The plotter classes can really only make sense for HPGL aware plotters. Maybe there would be other kinds of plotters, like gCode plotters.
We'll see how things evolve, but I don't think we should worry too much about creating a full fledged general purpose drawing language. After all, the main purpose of Chiplotle still is the hardware language and hardware communication.
On Sun, Mar 14, 2010 at 04:11:23PM -0400, douglas repetto wrote:
> These new compound commands makes me wonder whether we should look at
> some existing general purpose vector drawing packages to see whether we
> can use them instead of reimplementing everything from scratch. If we're
> going to have a few standard vector methods, it would make sense to
> figure out how to have a large library of them.
> Victor and I have already talked about expanding Chiplotle to more
> general purpose control of CNC machines -- gcode for cnc mills, for
> example. So there's a kind of tension between Chiplotle as a simple
> wrapper for hpgl files/commands, Chiplotle as a simple wrapper for
> generic vector-based machine control, and Chiplotle as a general purpose
> drawing language.
> I've seen various projects recently, for example, where people have used
> Processing to generate drawings and send them to plotters.
> Since Chiplotle is Python-based, maybe we should start looking at
> existing Python vector graphics packages to see how we can interface
> with them? I tried something like that in my camera->plotter project:
> But I couldn't get it to all work in Python, I ended up using several
> external command line programs.
> Just thinking out loud.
> On 3/14/10 3:48 PM, architetto francesco fantoni <hva - hermanitos
> verdes architetti> wrote:
> > I've committed to the repo a new class:
> > Supershape, it uses the 'superformula', a generalization of
> > superellipses first proposed by Johan Gielis.
> > It can be used to make nice shapes often found in nature.
> > see this:
> > http://en.wikipedia.org/wiki/Johan_Gielis
> > the compound command is:
> > Supershape(xy, width, height, m, n1, n2, n3, points=1000,
> > percentage=1.0, range=None)
> > width and height, well, are width and height
> > m, n1, n2, n3 are the parameters tha control the curve
> > points is the number of points we use (less is less accurate)
> > percentage (0.0-1.0) is how many of this points we use (0.5 will draw
> > half of the curve)
> > range is the angle we cover with the curve, default is 2*pi for a closed
> > curve.
> > for example you could try something like:
> > s = Supershape((0,0), 1000, 1000, 1, 0.5, 0.5, 0.5)
> > that draws a drop-like shape, or
> > s = Supershape((0,0), 1000, 1000, 8, 0.5, 0.5, 8)
> > for some sort of cloverleaf
> > best,
> > francesco
> > _______________________________________________
> > chiplotle-discuss mailing list
> > chiplotle-discuss at music.columbia.edu
> > http://music.columbia.edu/mailman/listinfo/chiplotle-discuss
> ............................................... http://artbots.org
> .....douglas.....irving........................ http://dorkbot.org
> .......................... http://music.columbia.edu/cmc/music-dsp
> .......... repetto............. http://music.columbia.edu/organism
> ............................... http://music.columbia.edu/~douglas
> chiplotle-discuss mailing list
> chiplotle-discuss at music.columbia.edu
More information about the chiplotle-discuss