Download - Etudes in Code, with Processing
![Page 1: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/1.jpg)
Etudes in code(even if you’re not a coder, yet)
flavors.me/peterkiRn
The tool: processing.org(Ben Fry, Casey Reas, et al)
Friday, July 22, 2011
![Page 2: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/2.jpg)
The blank page
Friday, July 22, 2011
![Page 3: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/3.jpg)
Processing is
a free place
to express ideas
about design with media
in textual
code.
Friday, July 22, 2011
![Page 4: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/4.jpg)
Data: Load an image
PImage img;
loadImage(“image.jpg”);
or
loadImage([uri]);
image(img,0,0);
Friday, July 22, 2011
![Page 5: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/5.jpg)
Interaction
The appearance of movement
Response to an input
mouseX, mouseY
“Draw loop”
setup(), draw()
Friday, July 22, 2011
![Page 6: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/6.jpg)
Adding a behavior
Variables
random(minimum, maximum);
Precision: floats, integers
Friday, July 22, 2011
![Page 7: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/7.jpg)
Adding a behavior
Sampling
color c = img.get(x,y);
or
img.loadPixels();
img.pixels[x,y];
Friday, July 22, 2011
![Page 8: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/8.jpg)
Transparency is magic
gray, alpha
r,g,b,alpha
etc.
Friday, July 22, 2011
![Page 9: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/9.jpg)
Loops and iteration
for(int i=0;i<num;i++) {
//do something ... more than once
}
Friday, July 22, 2011
![Page 10: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/10.jpg)
3D
Different renderers; OPENGL
Mobile, too
Deconstructing an image
Textures
Friday, July 22, 2011
![Page 11: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/11.jpg)
I love waves and circles
Friday, July 22, 2011
![Page 12: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/12.jpg)
Structure isdesign, form
Friday, July 22, 2011
![Page 13: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/13.jpg)
Structure isdesign, form
Friday, July 22, 2011
![Page 14: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/14.jpg)
Adding structure
Method
output doSomething(input variables) {
}
cupcake bake(cup of sugar, etc., etc.) {
}
Friday, July 22, 2011
![Page 15: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/15.jpg)
Adding structure
Class
class Thing {
Thing(inputs) { //make the thing
}
doSomething(input) { }
}
Friday, July 22, 2011
![Page 16: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/16.jpg)
Lists
A group of some kind of things
The ability to point at something in the list
ArrayList<Integer>
.add()
.get()
Friday, July 22, 2011
![Page 17: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/17.jpg)
Let’s talk
Q+A
http://flavors.me/peterkirn
http://createdigitalmotion.com
Follow up series to come
Friday, July 22, 2011
![Page 18: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/18.jpg)
Remember,
no
fear.
Friday, July 22, 2011
![Page 19: Etudes in Code, with Processing](https://reader034.vdocuments.us/reader034/viewer/2022051513/547be3d5b4af9fa5158b4f37/html5/thumbnails/19.jpg)
Photo creditsSine waves - CC-BY Jason Hargrove
Flickr: salty_soul
Machine scan - CC-BY zigazouFlickr: zigazou76
Striped boots - CC-BY Cameron RussellFlickr: camkage (Lomo-Cam)
US flag stripes - CC-BY Sam HowzitFlickr: aloha75
Friday, July 22, 2011