All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gnu.app.displayhack.Rorschach Maven / Gradle / Ivy

Go to download

Escher is a collection of libraries for X Window System written purely in Java.

The newest version!
package gnu.app.displayhack;


/** 
 * Simulate ink-blot patterns. It draws random patterns reminiscent of the
 * psychological test of same name.
 *
 * 

Modified from rorschach.c in xscreensaver * by Jamie Zawinski . * * @see * screenshot 8 * * @see * help output */ public class Rorschach extends DisplayHack { public int depth, offset, step_size; public long draw_delay; public boolean x_symmetry, y_symmetry; public Rorschach (String [] args) { super (args, true, true, true, 16, 2000); depth = option.intt ("depth", "level of details", 10000); draw_delay = option.longg ("draw-delay", "delay between iterations in millis", 10); offset = option.intt ("offset", "compactness of pattern", 4); int step_count = option.intt ("step-count", "total number of steps", 50); x_symmetry = option.booleann ("x-symmetry", "if symmetry along x-axis", true); y_symmetry = option.booleann ("y-symmetry", "if symmetry along y-axis", false); about ("0.1", "simulate ink-blot patterns", "Stephen Tse ", "http://escher.sourceforge.net/"); if (help_option) return; step_size = depth / step_count; } public void paint () { gc.set_foreground (random_color ()); int xlim = window.width; int ylim = window.height; int x = xlim/2; int y = ylim/2; for (int i=0; i





© 2015 - 2025 Weber Informatics LLC | Privacy Policy