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 />

272<br />

The sketch relies on a basic table structure made up of pie wedge shapes. There’s nothing<br />

new here, as you’ve looked at similar code in earlier examples. The sketch is a little more<br />

visually interesting than the pie chart, but can obviously be pushed further. By simply<br />

decreasing the value of the diameter variable <strong>and</strong> adding some r<strong>and</strong>omization, you can<br />

improve the output quite a bit, as shown in Figure 7-25.<br />

//Pie Fragments<br />

size(400, 400);<br />

background(255);<br />

smooth();<br />

noStroke();<br />

float radius = 10;<br />

for (int i=0; i

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

Saved successfully!

Ooh no, something went wrong!