Remarks: Processing Mazes

From Maze

(Difference between revisions)
Jump to: navigation, search
(Clarified intro and fixed tense problems.)
Line 1:Line 1:
[Notes from Mark S. to add: color, speed, line weight]
[Notes from Mark S. to add: color, speed, line weight]
−
The algorithm that defines the 10 PRINT maze exists independently from the Commodore 64 (C64) platform. In fact, the algorithm can be simply executed with a sheet of graph paper, a pen, and a coin to toss. The act of running the algorithm on a number of different platforms reveals what is essential to the algorithm from the specific constraints and affordances of the C64. The concision of 10 PRINT originates from its clever exploitation of the C64, as explained in section ??. For example, the code need not instruct the lines to wrap to the next line when they reach the edge of the screen because it's built into the system; lines don't need explicit x- and y-coordinates because characters 205 and 206 define them. When 10 PRINT is ported to other platform, as demonstrated in section ??, these features of the C64 need to be defined within the new platform. The primary constrains of 10 PRINT are C64 default blue on blue color palette and the 40 x 25 character screen.
+
The algorithm that defines the 10 PRINT maze exists independently from the Commodore 64 (C64) platform. In fact, the algorithm can be simply executed with a sheet of graph paper, a pen, and a coin to toss. The act of running the algorithm on a number of different platforms reveals what is essential to the algorithm from the specific constraints and affordances of the C64. The concision of 10 PRINT originates from its clever exploitation of the C64, as explained in section ??. For example, the code need not instruct the lines to wrap to the next line when they reach the edge of the screen because it's built into the system. The lines don't need explicit x- and y-coordinates because each character is drawn precisely next to the previous character to form the grid. More subtle defaults of the C64 include the color (light blue on blue) and the speed at which each new section of the maze is added. When 10 PRINT is ported to other platform, as demonstrated in section ??, these features of the C64 must to be defined consciously within the new platform. The precise color, resolution, and speed of the maze are open to new ideas. While many elements of the C64 program can be modified, some are constraints of the system. Primarily, the 40 x 25 character screen that defines the resolution of the grid is fundamental to the hardware architecture and defines the number of units that can comprise the maze.
−
When the C64 was launched in 1982, it was a powerful home computer for creating computers graphics. In the thirty years since the introduction, computers have changed substantially. Contemporary hardware is an interesting place to re-imagine the 10 PRINT algorithm. For this exploration, we used Processing, a programming system first designed in 2001. It's built on top of Java, one of the dominant modern programming languages, but Processing is specialized for making graphics and simplifies some of the native Java syntax. Java was first introduced in 1995 and is most similar to C++ (1983)[1], which is an object-oriented language that grew from C (1973).
+
When the C64 was launched in 1982, it was a powerful home computer for creating computers graphics. Contemporary hardware is an interesting place to re-imagine the 10 PRINT algorithm because it has changed substantially from its predecessors. For this exploration into re-imaging 10 PRINT, we used Processing, a programming system first designed in 2001. It's built on top of Java, one of the dominant modern programming languages, but Processing is specialized for making graphics and simplifies some of the native Java syntax. Java was first introduced in 1995 and is most similar to C++, which originated in 1983. C++ is an object-oriented programming language built on top of C, a procedural language that originated in the early 1970s.
−
The first Processing version of 10 PRINT was written for the increased resolution of contemporary screens. It did 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 maintained the grid of lines at 40 x 25 units, but unlike 10 PRINT it didn't add each grid unit in sequence, left to right and top to bottom, the entire grid was refreshed in unison. The color of the lines was set to white and the background to black, which gave the program a distinctly different feel from the original lower-contrast blues. 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 this new high-resolution version, the entire grid is refreshed in unison. Without thinking about it, we set used the default Processing colors to create white lines and a black background. In hindsight, this imbued the program a distinctly different feel from the original lower-contrast blues of the C64. The result is shown in figures ?? to ??.
The line endings are a subtle, but crucial change within this program. In the original 10 PRINT image (see fig ??), notice how each line terminates into a point. This is required because each of the 40 x 25 tiles that comprise the image are constrained to its 8 x 8 pixels area. This is is created by tiling these lines, fixed into their 64 pixels boxes. In the Processing program, each line is free to extend beyond and into the other lines area. This is because the lines are defined by x- and y-coordinates (precise locations on screen) rather than tile positions. Any number of shapes and colors can appear at any given pixel on screen.
The line endings are a subtle, but crucial change within this program. In the original 10 PRINT image (see fig ??), notice how each line terminates into a point. This is required because each of the 40 x 25 tiles that comprise the image are constrained to its 8 x 8 pixels area. This is is created by tiling these lines, fixed into their 64 pixels boxes. In the Processing program, each line is free to extend beyond and into the other lines area. This is because the lines are defined by x- and y-coordinates (precise locations on screen) rather than tile positions. Any number of shapes and colors can appear at any given pixel on screen.
Line 43:Line 43:
[[File:P5-10PRINT-212.png|400px|thumb|center|]]
[[File:P5-10PRINT-212.png|400px|thumb|center|]]
[[File:P5-10PRINT-951.png|400px|thumb|center|]]
[[File:P5-10PRINT-951.png|400px|thumb|center|]]
−
 
−
 
−
[1] In the C language two plus symbols "++" is a shortcut for adding one. For example x++ adds the value 1 to the variable x. The "++" in C++ is a reference to this operator.
 

Revision as of 11:05, 9 July 2011

View this revision of Remarks: Processing Mazes.

Personal tools