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.

PROCESSING: CREATIVE CODING AND COMPUTATIONAL ART<br />

418<br />

This sketch is not a pure copy, as there is some extra red at the end of the spectrum. To<br />

remove this, I’d still need to deal with the extra one-sixth of color range—which means I’m<br />

back to doing a little math—so I’ll tolerate the extra pretty red on the right. Not only can<br />

you specify the overall range, you can do it per component, <strong>and</strong> the ranges you assign to<br />

each component can be bizarrely different. Here’s a rather silly example illustrating this<br />

(see Figure 10-13):<br />

// Multi Modes<br />

size(720, 100);<br />

noStroke();<br />

// st<strong>and</strong>ard values<br />

colorMode(HSB, 360, 100, 100);<br />

for (int i=0; i

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

Saved successfully!

Ooh no, something went wrong!