Category Archives: Software

Hershey Text JS

Hershey Text JS

James “techninja” Todd has just released Hershey Text JS, a port of the Hershey fonts to JSON, capable of being rendered quickly via JavaScript & SVG.

The Hershey fonts a classic set of “engraving” or “stroke based” (as opposed to outline based) fonts that are excellent for use with all kinds of physical cutting, drawing, and painting machines. Several years ago we introduced the Hershey Text extension for Inkscape, and you can find a more in depth introduction to the Hershey fonts in that article.  Hershey Text JS is adapted from our Inkscape extension, and provides easy access to the font data for programmers who prefer to work in javascript.

A WaterColorBot Water Clock

watercolorclock_1

We built a evaporating-hand water clock using a WaterColorBot fitted with a Buddha Board. The Buddha Board is a black board with a gray ceramic coating that becomes transparent when wet, so you can paint on it with plain water to make black marks that disappear as the water evaporates.  (And, it fits nicely in a WaterColorBot with the appropriate jig.)

watercolorclock_2watercolorclock_3

As a clock, once a minute it draws the minute hand, then the hour hand, and finally the outline of the clock face.

watercolorclock_4

As the water evaporates over the course of a few minutes, the old minute hands fade away. It’s a neat effect.

And of course, video:

Continue reading A WaterColorBot Water Clock

StippleGen and a low-power DIY laser cutter

Jens demonstrates using StippleGen2 with his low-power (300 mW!) DIY laser cutter and a classic image of Louis Armstrong.

After letting StippleGen2 crunch the numbers for a while I imported the resulting vector graphic file into inkscape and generated the G-code so that I could use my laser cutter to cut the image into a black paper. 2 hours and 23 minutes later I had a 20×20 cm piece of paper with about a 1000 holes in it and it looks awesome! Would be perfect for a lamp shade or just nice to put up in a window and let the sun shine through. I can highly recommend StippleGen2 it’s super easy and a lot of fun.

StippleGen 2

StippleGen 5

Two months ago, we introduced StippleGen, a program that can generate stipple diagrams and “TSP path” art from images, using Adrian Secord’s algorithm of weighted Voronoi stippling.  It’s a great (and free) tool for turning a photo into CNC-ready artwork, for use on the Eggbot or in other contexts.

twain5kw-newframe

Today we’re announcing a new verison, StippleGen 2. As with the earlier version, StippleGen 2 is free and open source software, written in the Processing development environment. It comes ready to run on Mac, Windows, and Linux, and it is available for download now.

StippleGen 2 comes with three new features: A gently redesigned set of controls that makes life easier on tiny laptop screens, an inverse color scheme— as illustrated above —so that you can now calculate white stipples on a black background, and comprehensive documentation on our Wiki.

newgui

The controls in StippleGen 2 have been redesigned and streamlined. They are also overall a bit thinner so that the full screen (and all of the controls) can now be viewed on an 11″ MacBook Air, without reducing the size of the main display area.

rembrant2kw

In the first version of StippleGen, the image was always computed with black dots on a white background. For most images that have a light-colored background, this is a good choice.  However, if you have an image with a dark background, you may find that nearly all of your stipples are used to just darken the backdrop, leaving less detail available in the foreground of the image.

StippleGen 2 gives you the option to draw with black stipples on a white background or white stipples on a black background. By using a dark background here, you may be able to recognize Rembrandt in just 2000 white stipples.

rembrant10kwhite

It does, of course, look better with a larger number of points.

apollow10kblackapollow10kw-newframe3

For images with a lot of black and a lot of white, it can be hard to choose which is the better scheme.

However, as this is tool to generate applied artwork, the choice is often made for you in advance.  If you are drawing with a black pen on a white egg, you’ll want black stipples.  On the other hand, if you’re carving into a black panel, white stipples might be the better choice.

 

hopper7600w
starry10kw

And here are a couple of other “test images” that we’ve been running in the new color scheme.

plant10k_vor

And finally, we have written up comprehensive documentation for StippleGen 2, hosted on the Evil Mad Science Wiki.

StippleGen 2 is free and open source software, now available for download here.
Go try it out for yourself!

Modkit Micro on Kickstarter

modkit

Our friends at Modkit are running a new Kickstarter campaign for their excellent Modkit Micro software.

[… ] Microcontrollers are no longer just for engineers — anyone can now pick up an Arduino board at their local Radioshack! Now that microcontrollers are even easier to find and buy, they should be just as easy to interact with and program. Modkit Micro works to make microcontrollers accessible to anyone, regardless of their particular background or skill set.

Modkit Micro is a graphical programming environment for microcontrollers that supports a growing number of popular microcontroller platforms including Arduino and Wiring boards. It makes it easy for almost anyone (perhaps especially those with no programming background) to get started using microcontrollers, just by dragging and dropping blocks on their screen to write the firmware.

That part is already pretty neat, but what’s really great about Modkit is that it isn’t trying to be a substitute for “real” programming in source code. When you’re ready to go deeper, Modkit allows you to go “under the hood” to directly view and edit the code that it generated for you. If you’d like early access to try out Modkit, we’d encourage you to support their project— they’re opening up the next round of access to supporters this month.

Link: Modkit Micro on Kickstarter

StippleGen: Weighted Voronoi stippling and TSP paths in Processing

grace2k-2

One of the perennial problems that we come across in a variety of contexts, including CNC artwork and producing artwork for the Egg-Bot, is the difficulty of creating good-quality toolpaths– i.e., vector artwork representing halftones –when starting from image files.

One of the finest solutions that we’ve ever come across is Adrian Secord’s algorithm, which uses an iterative relaxation process to optimize a weighted Voronoi diagram, producing a set of points (stipples) that can closely approach the appearance of a traditional stipple drawing.

Another important technique is “TSP art,” where the image is represented by a single continuous path. You can generate a path like this by connecting all of the dots in a stipple diagram. Designing a route that visits each dot exactly once is an example of the famous Travelling Salesman Problem (or TSP). From the standpoint of toolpaths (for the Egg bot and most other CNC machines), a “TSP” path is even nicer than stipples, because little or no time is spent raising and lowering the tool.

Today we’re releasing a new program, StippleGen, which can generate stipple diagrams from images, using Secord’s algorithm. StippleGen saves its files as editable, Eggbot-ready Inkscape SVG files, which can in turn be opened by other vector graphics programs, or re-saved as PDF files for use in other contexts. It can also generate a TSP path from the stippled image, and either save that path as an SVG file or simply use that path as the order of plotting for the stipple diagram.

StippleGen is free and open source software, written in the Processing development environment. It comes ready to run on Mac, Windows, and Linux, and it is available for download now.

Continue reading StippleGen: Weighted Voronoi stippling and TSP paths in Processing

PeggyDraw 2

peggydraw2

 

We are pleased to finally release PeggyDraw 2, a little bit of long-delayed software. It’s a Processing application that you can use to draw simple 1-bit animations on a 25×25 grid. The neat bit, of course, is that you can press the “Save” button, and the file that it saves is actually an Arduino program, ready to be programmed onto a Peggy 2.

 

You can download PeggyDraw 2 right here. It’s fully built in Processing, so that it works on Mac, Windows, and Linux. Also, open source, designed to be adaptable.
Some things to note about this program:

 

  • If you don’t have Processing on your computer, download it here.
  • The editing interface is easy point-and-click. Try it out to see how it works.
  • You can individually pick different delay times per frame, as low as 20 ms, or give every frame the same duration.
  • The frame data is stored in Arduino program memory, so you’re only limited by the flash memory in terms of frame number– over 250 frames fit on an ATmega328P.
  • The output file is located in the PeggyDraw2 sketch directory, inside a directory named “PeggyProgram” “data.” The file is called “PeggyProgram.pde.”
  • You can both save a file and later reload it for editing.
  • The formats used in PeggyDraw 2 should be easily adaptable to write sequences for other types of LED grids, even of different aspect ratio and control software.

And, special thanks to Matt Mets, http://cibomahto.com for assistance with Processing.
Update, 3/19/2011: We’ve posted a new version, PeggyDraw 2 v. 1.1, available here. Note that the output file is now stored in the “data” directory, not a separate “PeggyProgram” directory.

SymmetriSketch: A simple app for playing with symmetry

We were recently contacted by a mathematics instructor, who suggested that it might be interesting to have a program like Snowflake, but with the option of picking and choosing different symmetry properties.

Natural snowflakes have (approximate) sixfold rotation symmetry plus reflection symmetry. However, a lot of things that you can draw by hand have absolutely no resemblance to snowflakes at all– and it is somewhat fun to explicitly play with the rules.

Our new program, SymmetriSketch, sticks to the same basic design principles as Snowflake: it’s cross platform, open source, and able to export a true vector drawing with a closed path. However, SymmetriSketch is a much more flexible program that allows you to play with different symmetries, and create all kinds of different things that would never be mistaken for frozen water.

Here’s what it looks like when the program first opens:

SymmetriSketch 1

The initial shape is an overall pentagon– an object with five-fold rotation symmetry and reflection symmetry. The figure is generated by taking the editable slice– highlighted here and when you start the program– and reflecting and rotating it to complete the full shape that you see.

Within the editable slice, you can also see three highlighted control points that can be dragged around. There is control point at every vertex and at the midpoint of every line segment between two vertices. If you drag a control point that is the midpoint of a line segment, it turns that control point into a new vertex. That new vertex also gets new control points at the midpoints to its neighbors.

Every vertex point can be moved to any location on the screen with the exception of the vertex that is initially at the top point of the pentagon– that vertex is constrained to move along the vertical axis– the axis of reflection symmetry.

SymmetriSketch 6

The controls are purposefully kept simple. There are two symmetry controls– for the order of rotational symmetry and to toggle reflection– which you can change in the lower left hand corner of the screen.

The number, with its +/- controls, refers to the order of discrete rotational symmetry. If the number shown is n, then n-fold rotational symmetry is applied, which means that the displayed object is unchanged when rotated by 360 degrees/n. In the screenshot above, 9-fold rotational symmetry is applied.

Orders from 1 to 99 are allowed– note that 1-fold rotational symmetry is “no symmetry at all” since it requires 360/1 = 360 degrees of rotation to return to the original shape.

The second control is for reflection symmetry, and toggles between “reflect” or “rot. only,” where it either does, or does not apply a mirror reflection across the vertical axis.

SymmetriSketch 3

With reflection symmetry turned off, the figure is drawn with pure rotational symmetry. (This screenshot was taken while editing the shape, and you can see control points, indicated by little circles.)

Continue reading SymmetriSketch: A simple app for playing with symmetry

Programming Meggy Jr RGB

Last week we released an Arduino environment library for the Meggy Jr RGB. The code is an open source project here, and the downloadable package comes several example programs, ranging from very simple to moderately complex. (One of the examples is a new game called Froggy Jr, where you help your a little round green frog cross the street and then a river.)

Today, to make it all a bit more useful, we are releasing the Meggy Jr RGB Programing guide, which you can download Here (600 kB PDF file).

Continue reading Programming Meggy Jr RGB