Remarks: Processing Mazes
From Maze
(Difference between revisions)
(Extending the paragraph about changing graphics) | |||
| Line 8: | Line 8: | ||
The first Processing version of 10 PRINT was written to take advantage of the increased resolution of contemporary screens. It does this by making the thickness and ends of the lines into variables that can be changed while the program runs. The lines of the maze can range from 0.5 to 10 pixels wide and the lines can terminate with a rounded or square end. Like 10 PRINT, it maintains the grid of lines at 40 x 25 units, but unlike 10 PRINT it doesn't add each grid unit in sequence from left to right and top to bottom. In the new high-resolution version, the entire maze is refreshed in unison. Without thinking carefully about it, we used the default Processing colors to create white lines and a black background. In hindsight, this imbued the program with a distinct mood from the original lower-contrast blues of the C64. The result is shown in figures ?? to ??. | The first Processing version of 10 PRINT was written to take advantage of the increased resolution of contemporary screens. It does this by making the thickness and ends of the lines into variables that can be changed while the program runs. The lines of the maze can range from 0.5 to 10 pixels wide and the lines can terminate with a rounded or square end. Like 10 PRINT, it maintains the grid of lines at 40 x 25 units, but unlike 10 PRINT it doesn't add each grid unit in sequence from left to right and top to bottom. In the new high-resolution version, the entire maze is refreshed in unison. Without thinking carefully about it, we used the default Processing colors to create white lines and a black background. In hindsight, this imbued the program with a distinct mood from the original lower-contrast blues of the C64. The result is shown in figures ?? to ??. | ||
| − | [THIS PARAGRAPH IS IN PROGRESS] | + | While we were creating these variations, we took the opportunity to make some additional quick changes to explore the visual aspects of the 10 PRINT maze. First, the 50-50 chance to draw a left or right line was altered so it could be weighted while the program ran to increase the chance of one line drawing instead of the other. The result is shown in Figures ?? to ??. Next, we tried drawing graphic symbols different from the diagonal lines to expose part of the programs structure. In our opinion, the essence of the 10 PRINT maze algorithm is to make a coin-toss, a 50-50 random decision, to draw a left or right diagonal line within a grid from left to right, top to bottom. The optical effect of the maze is created as the grid of diagonals align to produce walls and paths. Our eyes dance across the image as they attempt to find their way through the structure. As we quickly discovered through a few options, some symbols also create a strong, but different optical effect and other symbols generate a boring, flat graphic. Figure ?? shows the result of using a blank image (space) and circle in place of the diagonals. This quick exploration into applying a different visual skin to the fundamental coin-toss structure of the 10 PRINT program reveals that the appeal of 10 PRINT is derived from the random choice between one or more elements, the precise selection of which elements optically activate our eyes, and create a culturally relevant image, in this case, the maze. |
| − | While we were making these variations, we took the opportunity to make some additional quick changes to explore the visual aspects of the 10 PRINT maze. First, the 50-50 chance to draw a left or right line was altered so it could be changed while the program ran to increase the chance of one or the other. The result is shown in Figures ?? to ??. Next, we tried drawing symbols other than the diagonal lines to expose the structure of the program in a different way. In our opinion, the essence of the 10 PRINT maze algorithm is to make a coin-toss, a 50-50 random decision, to draw a left or right diagonal line within a grid from left to right, top to bottom. [MORE, about weighting the random values, using different symbols to show how it's based on the diagonals. ] | ||
It's important to note that these new changes could have been explored directly on the C64, but it was convenient to do to in Processing because Casey was writing this code and he was more fluent with that syntax than with BASIC. Every programmer is more familiar with some language than others. As with natural languages, it's easier to work through ideas in ones native tongue. The 10 PRINT variations to explore weighting the random value to have a higher percentage of one diagonal lines is created by changing the value after the decimal in 205.5: | It's important to note that these new changes could have been explored directly on the C64, but it was convenient to do to in Processing because Casey was writing this code and he was more fluent with that syntax than with BASIC. Every programmer is more familiar with some language than others. As with natural languages, it's easier to work through ideas in ones native tongue. The 10 PRINT variations to explore weighting the random value to have a higher percentage of one diagonal lines is created by changing the value after the decimal in 205.5: | ||
