A single random decision — slash or backslash — repeated across a grid produces an endlessly varied maze. Originally a one-line Commodore 64 BASIC program.
The lines are originally created by printing various characters from the character set of the Commodore 64 computer. These characters include diagonal lines, horizontal lines, and other symbols, which, when combined, create the appearance of a continuous and interconnected labyrinth.
Due to the random nature of the program, the specific characters used in each run of the code will differ. As a result, the pattern is continuously evolving, never repeating the exact same arrangement. This randomness adds to the hypnotic and mesmerizing quality of the pattern, capturing the viewer's attention as they observe the fluid and ever-changing artwork.
Though the "10 PRINT" pattern may seem simple on the surface, its repeated and overlapping diagonal lines give rise to a rich and visually engaging design that has fascinated programmers, artists, and enthusiasts for decades. The pattern's aesthetic appeal and its ability to evoke a sense of exploration and discovery within the viewer make it a captivating example of generative art and the elegance that can be achieved with minimalistic code.
let x = 0;
let y = 0;
let len = 20;
function setup() {
createCanvas(400, 400);
background(0);
}
function draw() {
stroke(255);
if (random(1) < 0.5) {
line(x, y, x + len, y + len);
} else {
line(x, y + len, x + len, y);
}
x = x + len;
if (x > width) {
x = 0;
y = y + len;
}
}Publication and Influence: The "10 PRINT" program first appeared in a book titled "BASIC Computer Games" in 1973, which was edited by David H. Ahl. The book was influential and contributed to the widespread adoption of BASIC programming among early computer enthusiasts.
Maze or Labyrinth Pattern: The pattern created by "10 PRINT" is often described as resembling a maze or labyrinth due to the overlapping diagonal lines, creating an illusion of interconnected paths.
Commodore 64: The program was initially written for the Commodore 64, an iconic 8-bit home computer that was immensely popular in the 1980s and early 1990s.
Generative Art: "10 PRINT" is considered an early example of generative art, a form of art that relies on algorithms and randomization to create visuals and sounds. It demonstrates how a simple algorithm can produce complex and visually appealing patterns.
Endless Variations: Each time the program is executed, it generates a unique variation of the pattern because of the random nature of the characters selected. This endless variety has made it a favorite among programmers and artists exploring generative art.
Cultural Impact: The "10 PRINT" program has gained a cult following and has been referenced and celebrated in various art installations, exhibitions, and programming communities.
Retro Programming Challenges: Recreating the "10 PRINT" pattern has become a popular challenge among retro programmers and enthusiasts aiming to implement it in various programming languages or on different platforms.
Educational Tool: The simplicity of the "10 PRINT" code makes it an excellent educational tool for introducing programming concepts and inspiring creativity among learners.
Literary Analysis: Beyond its programming significance, "10 PRINT" has also been the subject of academic study and literary analysis. In 2012, the MIT Press published a book titled "10 PRINT CHR$(205.5+RND(1)); : GOTO 10," which delves into the cultural implications and artistic aspects of the program.
The "10 PRINT" program's legacy as an iconic piece of code showcases the artistic and creative possibilities that exist within the world of programming. Its elegance lies in its simplicity, proving that a few lines of code can create captivating and visually striking results.
New tutorials, book updates, and behind-the-scenes notes from the studio. No schedule, no spam.