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.

PROCESSING: CREATIVE CODING AND COMPUTATIONAL ART<br />

658<br />

int pts = 4;<br />

float angle = 0;<br />

float radius = 115;<br />

float cylinderLength = 100;<br />

//vertices<br />

Point3D vertices[][];<br />

boolean isPyramid = false;<br />

void setup(){<br />

size(400, 400, P3D);<br />

noStroke();<br />

}<br />

void draw(){<br />

background(170, 95, 95);<br />

lights();<br />

fill(255, 200, 200);<br />

translate(width/2, height/2);<br />

rotateX(frameCount*PI/150);<br />

rotateY(frameCount*PI/130);<br />

rotateZ(frameCount*PI/180);<br />

// initialize point arrays<br />

vertices = new Point3D[2][pts+1];<br />

// fill arrays<br />

for (int i=0; i

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

Saved successfully!

Ooh no, something went wrong!