A port of Evil Mad Scientist's StippleGen Processing app to full desktop Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
out
p5libs
res
screenshots
src
toxiclibs
.DS_Store
.gitignore
LICENSE
README.md
StippleGen.iml
dummy.png
header.txt
mark_twain.icns
mark_twain_stipple_icon.png

README.md

StippleGen (OSX port)

screenshot

Download for OSX (181.6mb)

A port of Evil Mad Scientist's StippleGen Processing app to full desktop Java and wrapped as an OSX .app executable. This is quite a drastic rewrite so a pull-request on the original project wasn't suitable and EMS are happy for me to release this port.

All this project really does is move the user interface outside the Processing draw loop, generating Voronoi cells and then calculating the most efficient path when exporting using TSP are both expensive operations, the existing ui can lock up for seconds at a time. By hosting the Processing frame in a Java desktop app and moving the controls outside of the sketch the responsiveness of the ui improves dramatically. I had wanted to introduce some RxJava goodness but the origial code is extremely stateful and a more thorough refactor will have to wait for another time (Update: see VoronoiCL for a more thorough refactor). I have tried to simplify where possible and moved the file selection and SVG export code out of the main sketch to reduce the 1000+ line class. The SVG export in this app uses a buffered FileWriter which is quicker and more reliable than the old method using Processing's String[] append to build up the SVG.

Although the release has been built for OSX the .jar itself should run fine on Linux and Windows too and pull requests to help generate builds for those platforms would be welcome. The project is built using the free Community Edition of Jetbrains IntelliJ IDEA.

OSX .app Build Instructions

This is a manual process but could be automated:

  • Clone this project and open using Jetbrains IDEA.
  • From the Build menu select Build Artifacts..., this will produce the executeable .jar
  • Clone jar2app and generate the OSX .app using:
python jar2app.py path/to/StippleGen.jar -r path/to/java.jdk --icon=path/to/mark_twain.icns

  • To generate the .dmg installer, clone create-dmg and run something like:
  ./create-dmg \
    --volname "StippleGen Installer" \
    --window-pos 200 120 \
    --window-size 800 400 \
    --icon StippleGen.app 200 190 \
    --hide-extension StippleGen.app \
    --app-drop-link 600 185 \
    StippleGen-Installer.dmg \
    StippleGen.app/