10 Print

I was inspired by one of Coding Train’s videos on using 10 print.

10 PRINT CHR$(205.5+RND(1)); : GOTO 10

This one line of code generates maze-like structures like below:

10 Print created from backslash and forward slash characters.

It’s pretty easy to do this in P5.js. I made a grid of squares then iterated over them giving it a 50/50 chance of containing a forward or backward line. Changing the number of squares on the grid gives a denser image.

From the baseline above I tried out some variations with circles and arcs. I’m kinda cheating because the code for this is a lot more than one line.

10 Print using arcs and ellipses along with backslash and forward slash lines.
At too high of a density and the lines and shapes start to blend together.

Here is the code if you’re interested.