Do you know this? If you are bored you start scribbling around on a sheet of paper. Now I was wondering, how it could look like, if a computer program would do the same…

So, here it is: The Simple Graphics Generator. I have some basic rules:

  1. There are only four directions: up, down, left, right.
  2. The graphic is painted in steps or iterations. Each step uses the same distance.
  3. It is not allowed to go backwards.
  4. There should be no junctions (This is not working well yet…).

The start position is determined randomly. And then, for each iteration, the direction is chosen randomly, too, with the rules in mind. In the end, the result should be a single long line, like this:

Screenshot of Simple Graphics Generator

The program is written in Java with JavaFX. You can download