Editing StippleGen

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 7: Line 7:
  
  
One of the perennial problems that we have 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://shop.evilmadscientist.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 [https://web.archive.org/web/20210106025705/https://mrl.cs.nyu.edu/~ajsecord/stipples.html Adrian Secord's algorithm], which uses an iterative relaxation process to optimize a weighted  [http://en.wikipedia.org/wiki/Voronoi_diagram Voronoi diagram], mathematically producing a set of points (stipples) that can closely approach the appearance of a traditional stipple drawing.   
+
One of the perennial problems that we have 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  [http://en.wikipedia.org/wiki/Voronoi_diagram 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.
 
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.
Line 15: Line 15:
 
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.
 
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.  An introduction to StippleGen version 2 is also available [http://www.evilmadscientist.com/2012/stipplegen2/ here].
+
You can read an extended [http://www.evilmadscientist.com/article.php/stipple introduction to StippleGen] at Evil Mad Scientist Laboratories.
  
 +
== Download ==
  
== 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?q=stipplegen available for download here].  The current version number is 2.01.
 +
 
 +
(StippleGen is hosted as part of the Eggbot project [http://code.google.com/p/eggbotcode/ on Google Code].)
  
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 [https://github.com/evil-mad/stipplegen/releases/latest available for download here].  The current version number is 2.31.
 
  
 +
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.
  
The download includes ready-to-run platform-specific versions of StippleGen for Mac, Windows, and Linux, as well as the source code. Current Mac and Windows versions include Java. For linux, you will need to have a recent version of [http://java.com/ Java] installed on your computer.
 
  
 
== Quick Start ==
 
== Quick Start ==
Line 108: Line 110:
 
http://evilmadscience.s3.amazonaws.com/wiki/eggbot/stipplegen/v2docs/plant2k.png
 
http://evilmadscience.s3.amazonaws.com/wiki/eggbot/stipplegen/v2docs/plant2k.png
  
Shown above are two stipple drawings made from the same image of a corn plant, a sample image from [https://web.archive.org/web/20210106025705/https://mrl.cs.nyu.edu/~ajsecord/stipples.html here]. One drawing is made with black dots on a white background, and the other has white dots on a black background.  However, each drawing has 2000 dots and the parameters are otherwise identical.  In this case, as the source image was predominantly white, the image with the white background is of considerably higher quality, as the dots are concentrated in the area of interest, rather than in the background.
+
Shown above are two stipple drawings made from the same image of a corn plant, a sample image that you can download [http://mrl.nyu.edu/~ajsecord/stipples.html here]. One drawing is made with black dots on a white background, and the other has white dots on a black background.  However, each drawing has 2000 dots and the parameters are otherwise identical.  In this case, as the source image was predominantly white, the image with the white background is of considerably higher quality, as the dots are concentrated in the area of interest, rather than in the background.
  
 
   
 
   
Line 227: Line 229:
  
  
The TSP ("travelling salesman problem") path is an efficient route plotted between the stipple locations.  And, depending on how you plan to use StippleGen's output, this part of the process may or may not be important to you:
+
The TSP ("travelling salesman problem") path is an efficient route plotted between the stipple locations.  And, depending on how plan to use StippleGen's output, this part of the process may or may not be important to you:
  
 
* If you are creating a set of stipple points for use on the Eggbot, the order in which the points are plotted is given by their order in the file.  If you allow the TSP path to be calculated— at least until the end of the "rats nest" stage —will dramatically reduce plotting time.
 
* If you are creating a set of stipple points for use on the Eggbot, the order in which the points are plotted is given by their order in the file.  If you allow the TSP path to be calculated— at least until the end of the "rats nest" stage —will dramatically reduce plotting time.
Line 345: Line 347:
 
== Source Code ==
 
== Source Code ==
  
The StippleGen source code is available at [https://github.com/evil-mad/stipplegen GitHub].  To run the code from source, you'll need to download [http://processing.org/ Processing], and install the [https://bitbucket.org/postspectacular/toxiclibs/wiki/Home toxiclibs library] and the [http://www.sojamo.de/libraries/controlP5/ ControlP5 library]. You don't need to download these libraries separately; install and start Processing, then go to Sketch | Import Library... | Add Library... , search for them and click Install, and it will install them in the right place automatically. (Update the "sketchbook path" in the Preferences if you don't want them installed in a "processing" subdir of your home folder.)
+
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].

Please note that all contributions to Evil Mad Scientist Wiki are considered to be released under the GNU Free Documentation License 1.3 (see Evil Mad Scientist Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)