|
|
(12 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | | + | #REDIRECT [[StippleGen]] |
− | | |
− | == Introduction ==
| |
− | http://evilmadscience.s3.amazonaws.com/wiki/eggbot/stipplegen/v2docs/graceegg-640.jpg
| |
− | | |
− | '''StippleGen''' is a free, open source, and cross-platform utility from [http://www.evilmadscientist.com/ Evil Mad Scientist Laboratories] that can create stipple drawings and “[[TSP art]],” from image files.
| |
− | | |
− | | |
− | '''Why do this?''' One of the perennial problems that we come across in a variety of contexts, including [http://www.evilmadscientist.com/2012/cnc-halftones-with-ascii-art/ CNC artwork] and producing artwork for the [http://evilmadscience.com/productsmenu/tinykitlist/171-egg-bot 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 [http://mrl.nyu.edu/~ajsecord/stipples.html Adrian Secord's algorithm], which uses an iterative relaxation process to optimize a weighted Voronoi diagram, mathematically 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 (and minimizing the distance travelled) is an example of the famous [http://en.wikipedia.org/wiki/Travelling_salesman_problem Travelling Salesman Problem] (or just “TSP”), and an optimal TSP path can give a surprisingly good grayscale representation of an image. 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.
| |
− | | |
− | | |
− | | |
− | StippleGen is easy-to-use software that can generate TSP and stipple drawings from input images. It 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.
| |
− | | |
− | You can read an extended [http://www.evilmadscientist.com/article.php/stipple introduction to StippleGen] at Evil Mad Scientist Laboratories.
| |
− |
| |
− | | |
− | | |
− | == Download ==
| |
− | | |
− | StippleGen is free and open source software, written in the [http://processing.org/ Processing development environment]. It comes ready to run on Mac, Windows, and Linux, and it is [http://code.google.com/p/eggbotcode/downloads/list?can=2&q=stipplegen available for download here].
| |
− | | |
− | (StippleGen is hosted as part of the Eggbot project [http://code.google.com/p/eggbotcode/ on Google Code].)
| |
− | | |
− | | |
− | The download includes ready-to-run platform-specific versions of StippleGen for Mac, Windows, and Linux, as well as the source code. You will need to have a recent version of [http://java.com/ Java] installed on your computer. If the platform-specific version of the software won't run on your computer, please install Java and try again.)
| |
− | | |
− | == Usage ==
| |
− | | |
− | | |
− | http://evilmadscience.s3.amazonaws.com/wiki/eggbot/stipplegen/v2docs/grace2k-newframe.png
| |
− | | |
− | <div style="width=300px;">http://evilmadscience.s3.amazonaws.com/wiki/eggbot/stipplegen/v2docs/grace2k-newframe.png</div>
| |
− | | |
− | | |
− | When you first open up StippleGen, you will be presented with this window, which shows the drawing in progress (in the top part) and a set of controls below that.
| |
− | Rather than present you with a blank screen, StippleGen automatically loads a demo image ([http://commons.wikimedia.org/wiki/File:Kelly,_Grace_(Rear_Window).jpg source]) upon launch, and begins calculating. This way, you can try out the program, even if you don't have a good image of your own to start with. And, you can stop it at any time by loading a new image.
| |
− | | |
− | == Source Code ==
| |
− | | |
− | The StippleGen source code is available as part of the [http://code.google.com/p/eggbotcode/downloads/list?can=2&q=stipplegen StippleGen .zip file]. To run the code from source, you'll need to download [http://processing.org/ Processing], and install the [http://hg.postspectacular.com/toxiclibs/downloads toxiclibs library] and the [http://www.sojamo.de/libraries/controlP5/ ControlP5 library].
| |