Mais conteúdo relacionado
Etudes in Code, with Processing
- 1. 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
- 3. Processing is
a free place
to express ideas
about design with media
in textual
code.
Friday, July 22, 2011
- 4. Data: Load an image
PImage img;
loadImage(“image.jpg”);
or
loadImage([uri]);
image(img,0,0);
Friday, July 22, 2011
- 5. Interaction
The appearance of movement
Response to an input
mouseX, mouseY
“Draw loop”
setup(), draw()
Friday, July 22, 2011
- 6. Adding a behavior
Variables
random(minimum, maximum);
Precision: floats, integers
Friday, July 22, 2011
- 7. Adding a behavior
Sampling
color c = img.get(x,y);
or
img.loadPixels();
img.pixels[x,y];
Friday, July 22, 2011
- 9. Loops and iteration
for(int i=0;i<num;i++) {
//do something ... more than once
}
Friday, July 22, 2011
- 10. 3D
Different renderers; OPENGL
Mobile, too
Deconstructing an image
Textures
Friday, July 22, 2011
- 14. Adding structure
Method
output doSomething(input variables) {
}
cupcake bake(cup of sugar, etc., etc.) {
}
Friday, July 22, 2011
- 15. Adding structure
Class
class Thing {
Thing(inputs) { //make the thing
}
doSomething(input) { }
}
Friday, July 22, 2011
- 16. 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
- 17. Let’s talk
Q+A
http://flavors.me/peterkirn
http://createdigitalmotion.com
Follow up series to come
Friday, July 22, 2011
- 19. Photo credits
Sine waves - CC-BY Jason Hargrove
Flickr: salty_soul
Machine scan - CC-BY zigazou
Flickr: zigazou76
Striped boots - CC-BY Cameron Russell
Flickr: camkage (Lomo-Cam)
US flag stripes - CC-BY Sam Howzit
Flickr: aloha75
Friday, July 22, 2011