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.

function call above*/<br />

// fill(i*255/ballCount);<br />

//draw balls<br />

ellipse(xpos[i], ypos[i], wdth[i], ht[i]);<br />

//upgrade position values<br />

xpos[i]+=xspeed[i];<br />

ypos[i]+=yspeed[i];<br />

/*conditionals:<br />

detects ball collision with sketch window edges<br />

accounting for ball thickness.<br />

*/<br />

if (xpos[i]+wdth[i]/2>=width || xpos[i]=height || ypos[i]

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

Saved successfully!

Ooh no, something went wrong!