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.

Pie charts, although valuable as visualization tools, don’t do much for me. The next sketch,<br />

shown in Figure 7-24, is a progression of a pie wedge from a thin fragment to a full pie. I<br />

also incremented the value of the wedge fill color.<br />

//Progressive Arcs<br />

size(400, 400);<br />

background(50);<br />

smooth();<br />

noStroke();<br />

float diameter = 40;<br />

float ang = 0;<br />

float col = 0;<br />

float xCount = width/diameter;<br />

float yCount = height/diameter;<br />

float cellTotal = xCount*yCount;<br />

float angIncrement = radians(360.0/cellTotal);<br />

float colIncrement = 255.0/cellTotal;<br />

for (float i=diameter/2; i

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

Saved successfully!

Ooh no, something went wrong!