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

360<br />

//complete parameter list<br />

makePoly(x, y, pts, radius 1, radius 2, initial rotation, ➥<br />

stroke Color, stroke Weight, fill Color, endcap, stroke join)<br />

*/<br />

// makePoly function calls<br />

makePoly(width/2, height/2, 72, 420, 270, 45, color(0, 0, 0), ➥<br />

16, color(255, 255, 255));<br />

makePoly(width/2, height/2, 16, 300, 250, 45, color(200, 200, 200),➥<br />

10, color(20, 20, 20));<br />

makePoly(width/2, height/2, 60, 210, 210, 45, color(255,255,255), ➥<br />

8, color(0,0,0), PROJECT, ROUND);<br />

makePoly(width/2, height/2, 60, 200, 155, 45, color(120, 120, 120),➥<br />

6, color(255, 255, 255), PROJECT, ROUND);<br />

makePoly(width/2, height/2, 50, 280, -200, 45, ➥<br />

color(200, 200, 200), 6, color(50, 50, 50), PROJECT, ROUND);<br />

makePoly(width/2, height/2, 8, 139, 139, 68, color(255, 255, 255), ➥<br />

5, color(0,0,0));<br />

makePoly(width/2, height/2, 24, 125, 60, 90, color(50, 50, 50), 12,➥<br />

color(200, 200, 200), ROUND, BEVEL);<br />

makePoly(width/2, height/2, 4, 60, 60, 90, color(0,0,0), 5, ➥<br />

color(200,200,200), ROUND, BEVEL);<br />

makePoly(width/2, height/2, 4, 60, 60, 45, color(255, 255, 255), 5,➥<br />

color(20, 20, 20), ROUND, BEVEL);<br />

makePoly(width/2, height/2, 30, 30, 30, 90, color(75, 75, 75), 10, ➥<br />

color(60,60,60), ROUND, BEVEL);<br />

makePoly(width/2, height/2, 30, 28, 28, 90, color(255, 255,255), 2,➥<br />

color(60,60,60), ROUND, BEVEL);<br />

makePoly(width/2, height/2, 24, 10, -25, 45, #000000, .75, ➥<br />

color(255, 255, 255), SQUARE, MITER);<br />

}<br />

//default - if no args passed<br />

void makePoly(){<br />

// call main makePoly function<br />

makePoly(width/2, height/2, 4, width/4, width/4, ➥<br />

45, #777777, 4, #AAAAAA, SQUARE, MITER);<br />

}<br />

// x, y, pts args<br />

void makePoly(float x, float y, int pts){<br />

// call main makePoly function<br />

makePoly(x, y, pts, width/4, width/4, ➥<br />

45, #777777, 4, #AAAAAA, SQUARE, MITER);<br />

}

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

Saved successfully!

Ooh no, something went wrong!