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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 10-4. Alpha sketch<br />

In this example, each row of cells overlaps the preceding row, illustrating some of the<br />

beautiful translucent effects you can get by procedurally altering the alpha. By incorporating<br />

color <strong>and</strong> alpha modulations with some of the other techniques you’ve looked at<br />

earlier—such as generating a series of simple shapes iteratively through translations—you<br />

can create aesthetically interesting images of layered geometry that begin to approximate<br />

other media, such as painting. Here’s an example, shown in Figure 10-5:<br />

/*<br />

Fade-Spin<br />

Ira Greenberg, January 7, 2006<br />

*/<br />

int w = 20, h = 20;<br />

float ang = 0;<br />

float amp = 60;<br />

void setup(){<br />

size(500, 300);<br />

background(170, 120, 150);<br />

noStroke();<br />

smooth();<br />

for (int i=0, x=0; i

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

Saved successfully!

Ooh no, something went wrong!