04.04.2013 Views

Processing: Creative Coding and Computational Art

Processing: Creative Coding and Computational Art

Processing: Creative Coding and Computational Art

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

http://processing.org/. My main objective therefore is to briefly describe the overall<br />

organization of the API <strong>and</strong> emphasize certain key issues. The rest of the book focuses on<br />

code experiments that contextually move throughout the entire API, including some of the<br />

core code libraries, which I’ll say more about at the end of this reference.<br />

The complete (extended) API is segmented into 15 sections, which are further divided into<br />

45 subsections, with nearly 300 separate items, including functions, operators, constants,<br />

system variables, data types, <strong>and</strong> control structures. The 15 main sections are titled as<br />

follows:<br />

Structure<br />

Structure<br />

Environment<br />

Data<br />

Control<br />

Shape<br />

Input<br />

Output<br />

Transform<br />

Lights, Camera<br />

Color<br />

Image<br />

Rendering<br />

Typography<br />

Math<br />

Constants<br />

The nearly 30 items organized within the Structure section range from basic syntactic<br />

symbols—such as comment structures ( // <strong>and</strong> /* */), parentheses, semicolons, <strong>and</strong> array<br />

brackets—to reserved language keywords, such as “class,” “this,” “true,” “super,” <strong>and</strong><br />

“extends.” In addition, there are the <strong>Processing</strong> function calls setup(), size(), noLoop(),<br />

delay(), exit(), draw(), loop(), <strong>and</strong> redraw().<br />

Structural elements in a programming language are used to organize the process of<br />

coding—a semicolon terminates a line, a dot connects an object to its properties <strong>and</strong><br />

methods, curly braces ({ }) organize a block of code, <strong>and</strong> so forth. Structure allows you to<br />

build, in a sense, sentences <strong>and</strong> stories with your code to visualize <strong>and</strong> express your ideas.<br />

I cover the concept of structure as it relates to general programming theory/practice in<br />

more detail in Chapter 3.<br />

PROCESSING LANGUAGE API<br />

677<br />

A

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!