Tuesday, 17 February 2009

TouchShield processing bubbles

I can't believe it took me this long to upload this little app, converted to the TouchShield Slide. It's the fun little Processing demo app where you touch your finger to the screen, and various sized bubbles are drawn in a concentric radius around your touch... the bubbles get bigger the further out you go.



This is made possible with Mark's new and improved super-fast (and I'll add, actually functional!) graphics library :)



I've uploaded the code to the app store here, but in the meantime here's the heart of the functionality (notice it's still copied line for line from the Processing demo book, since all the functions are ported!):


for(int i = 0; i <= width; i += 20) {
for(int j = 0; j <= width; j += 20) {
float size = dist(mouseX, mouseY, i, j);
size = size/max_distance * 15;
ellipse(i, j, size, size);
}
}




Oh yeah, and it occured to me that I've done a really bad job at uploaded all the quirky little source code snippets I've written for the TouchShield Slide over the past few months, so I think I'll do my best and try to release an app or two each day the next week!

0 comments:

Post a Comment