Remarks: Processing Mazes
From Maze
(Difference between revisions)
| Line 79: | Line 79: | ||
| − | With this enhanced resolution in mind, we wrote a third version of 10 PRINT in Processing that took more liberties with the original program. The number of rows and columns in the grid were variable, the direction of the line defined its color (black or white), each line was defined as a quadrilateral to give more flexibility of the shape, and a third color was used for the background. Each time the code is run, the size of the grid unit is defined at random as a power of 2 (2, 4, 8, 16, or 32) and the thickness of the lines are set randomly to 2, 4, or 8. Figures ?? and ?? show some of the varied results. With the ability to further define the graphics, the code became longer than the C64 one-liner: | + | With this enhanced resolution in mind, here is a third version of 10 PRINT in Processing that takes more liberties with the original program. The number of rows and columns in the grid are variable, the direction of the line defines its color (black or white), each line is defined as a quadrilateral to give more flexibility of the shape, and a third color is used for the background. Each time the code is run, the size of the grid unit is defined at random as a power of 2 (2, 4, 8, 16, or 32), and the thickness of the lines set randomly to 2, 4, or 8. Figures ?? and ?? show some of the varied results. With the ability to further define the graphics, the code becomes longer than the C64 one-liner: |
size(1020, 680); | size(1020, 680); | ||
