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:
- There are only four directions: up, down, left, right.
- The graphic is painted in steps or iterations. Each step uses the same distance.
- It is not allowed to go backwards.
- 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:
The program is written in Java with JavaFX. You can download