adapted from https://github.com/daveagp/java_visualize/tree/master/example-code

examples created by David Pritchard
