gnu.app.displayhack
Class Squiral
java.lang.Object
gnu.app.Application
gnu.x11.Application
gnu.app.displayhack.DisplayHack
gnu.app.displayhack.Squiral
- All Implemented Interfaces:
- java.lang.Runnable
public class Squiral
- extends DisplayHack
Square spirals. It displays interacting, spiral-producing automata.
Modified from squiral.c
in xscreensaver by Jeff Epler
. Object-oriented-ized. Cyclic color not yet
implemented.
- See Also:
-
screenshot 8,
help output
Fields inherited from class gnu.app.displayhack.DisplayHack |
clear, colors, delay, erase, eraser_delay, eraser_delta, eraser_gc, eraser_mode, gc, gc_values, random, stop_now, thread, window |
Constructor Summary |
Squiral(java.lang.String[] args)
|
Method Summary |
boolean |
clear(int x,
int y)
If a pixel is not filled. |
void |
init()
|
static void |
main(java.lang.String[] args)
|
void |
paint()
|
Methods inherited from class gnu.app.displayhack.DisplayHack |
about, chance, dispatch_event, erase, exec, exit, random_color, random_int, random_sign, restart, run, sleep |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NORTH
public static final int NORTH
- See Also:
- Constant Field Values
EAST
public static final int EAST
- See Also:
- Constant Field Values
SOUTH
public static final int SOUTH
- See Also:
- Constant Field Values
WEST
public static final int WEST
- See Also:
- Constant Field Values
DX
public static final int[] DX
- x increment values for different directions.
DY
public static final int[] DY
- y increment values for different directions.
disorder
public float disorder
fill
public float fill
left_handed
public float left_handed
draw_delay
public long draw_delay
worm_count
public int worm_count
filled_count
public int filled_count
worms
public Squiral.Worm[] worms
filled
public boolean[] filled
- If a pixel in window is filled.
EMPTY_FILLED
public boolean[] EMPTY_FILLED
- If a pixel in window is filled.
Squiral
public Squiral(java.lang.String[] args)
clear
public boolean clear(int x,
int y)
- If a pixel is not filled.
init
public void init()
paint
public void paint()
- Specified by:
paint
in class DisplayHack
main
public static void main(java.lang.String[] args)