Processing is an open source programming language and environment for people who want to program images, animation, and sound. It is used by students, artists, designers, architects, researchers, and hobbyists for learning, prototyping, and production. It is created to teach fundamentals of computer programming within a visual context and to serve as a software sketchbook and professional production tool. Processing is developed by artists and designers as an alternative to proprietary software tools in the same domain.
The Processing IDE is a simplified environment for developing "sketches "
MyFirstProgram
MyFirstProgram
MyFirstProgram
.
Examine how certain words are different colors. Run the sketch.
//
/*
, ends with */
MyFirstProgram
MyFirstProgram
MyFirstProgram
Notesprintln()
function displays text in the Text Area of the Processing
window
Make a syntax error: change ellipse
to elipse
and
click "Run"
Fix the errors in the following code:
size(200,200; background(); stroke 255; fill(150) rectMode(center); rect(100,100,50);
Processing programs start out as text, they are translated into byte code, and then executed to run.
Exercise: Using what you designed in Chapter one, implement
your own sketch, using only 2D primitive shapes - arc()
, curve()
,
ellipse()
, line()
, point()
, quad()
,
rect()
, triangle()
- and basic color functions - background()
,
colorMode()
, fill()
, noFill()
, noStroke()
,
stroke()
. Remember to use size()
to specify the
dimensions of your window.