CS 151 | Information Technology | Spring 2019 | |
Programming in ProcessingProgrammingProgramming is the process of creating software that accomplishes a specific task on a computer. Typically this is done using a high-level, general pupose programming language. There are hundereds of programming languages and have similar features. We will be using a language called Processing. ProcessingThe programming language Processing was developed at MIT to help non-science students learn to program, particularly those interested in the visual arts. It is free to download and is available on most public computers across campus. The Processing web site has many tutorials that you can use to help you learn Processing. I encourage you to watch the Hello Processing tutorial by Daniel Shiffman et al.Processing's computational model is the production of a "sketch" that is graphical and can include animation. In the most basic programs, one sets attributes then draws some features. There are many built-in functions for creating simple graphics in Processing as described on the Processing Reference page. Some basic drawing features are
There are many built-in functions for setting graphics attributes in Processing as described on the Processing Reference page. Some basic drawing features are
Rather than naming colors, Processing uses numeric values to represent specific colors. The default is to use the RGB color model, which is extensively on modern computers. In this model, a color is represented by a triple of values (R,G,B), where R represents the amount of red, G represents the amount of green, and B represents the amount of blue. Typically each one or the color components is an 8-bit number having a value between 0 and 255. Thus, one can represent 224 = 16,777,216 different colors! You can use Processing's Color Selector to identify colors See the Color tutorial for more information. ExampleHere is a simple example showing what one can do using Processing.
Processing Homework #1Similar to the code example above, create a "self-portrait" or fun graphic representing you in some way.References
Copyright © 2019, David A. Reimann. All rights reserved. |