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

286<br />

//bezierVertex() - open <strong>and</strong> filled<br />

strokeWeight(2);<br />

x = 400;<br />

fill(127);<br />

beginShape();<br />

vertex(50+x, 50);<br />

bezierVertex(92+x, 15, 134+x, 15, 175+x, 50);<br />

bezierVertex(215+x, 92, 215+x, 134, 175+x, 175);<br />

bezierVertex(135+x, 205, 105+x, 205, 75+x, 175);<br />

bezierVertex(50+x, 145, 50+x, 105, 75+x, 75);<br />

bezierVertex(100+x, 54, 125+x, 54, 150+x, 75);<br />

bezierVertex(175+x, 100, 175+x, 125, 150+x, 150);<br />

bezierVertex(134+x, 160, 118+x, 160, 100+x, 150);<br />

bezierVertex(92+x, 140, 92+x, 130, 100+x, 115);<br />

endShape();<br />

//lines connecting anchor points to control h<strong>and</strong>les<br />

strokeWeight(1);<br />

stroke(0);<br />

line(50+x, 50, 92+x, 15); line(134+x, 15, 175+x, 50);<br />

line(175+x, 50, 215+x, 92); line(215+x, 134, 175+x, 175);<br />

line(175+x, 175, 135+x, 205); line(105+x, 205, 75+x, 175);<br />

line(75+x, 175, 50+x, 145); line(50+x, 105, 75+x, 75);<br />

line(75+x, 75, 100+x, 54); line(125+x, 54, 150+x, 75);<br />

line(150+x, 75, 175+x, 100); line(175+x, 125, 150+x, 150);<br />

line(150+x, 150, 134+x, 160); line(118+x, 160, 100+x, 150);<br />

line(100+x, 150, 92+x, 140); line(92+x, 130, 100+x, 115);<br />

//control h<strong>and</strong>les<br />

fill(255);<br />

ellipse(92+x, 15, 8, 8); ellipse(134+x, 15, 8, 8);<br />

ellipse(215+x, 92, 8, 8); ellipse(215+x, 134, 8, 8);<br />

ellipse(135+x, 205, 8, 8); ellipse(105+x, 205, 8, 8);<br />

ellipse(50+x, 145, 8, 8); ellipse(50+x, 105, 8, 8);<br />

ellipse(100+x, 54, 8, 8); ellipse(125+x, 54, 8, 8);<br />

ellipse(175+x, 100, 8, 8); ellipse(175+x, 125, 8, 8);<br />

ellipse(134+x, 160, 8, 8); ellipse(118+x, 160, 8, 8);<br />

ellipse(92+x, 140, 8, 8); ellipse(92+x, 130, 8, 8);

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

Saved successfully!

Ooh no, something went wrong!