Watch FunProgramming [video 49]
Copy this image of an adorable kitten onto your desktop
http://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Young_cats.jpg/320px-Young_cats.jpg
Create a new sketch in Processing and save the sketch as “CopyImage”
Save the kitten image to your project (using “Sketch” then ”Add file” in the Processing menu)
Here’s my program:
PImage myphoto;
void setup()
{
size(500,500);
myphoto = loadImage("320px-Young_cats.jpg");
}
void draw()
{
image(myphoto,0,0);
copy(myphoto,0,0,100,100,250,250,50,50);
copy(myphoto,100,100,100,100,200,250,50,50);
copy(myphoto,0,100,100,100,200,300,50,50);
copy(myphoto,200,100,100,100,250,300,50,50);
}
Type in my program and run it.
Change the program to make your own scrambled kitty
Change the program to make an image of nothing but lots of cat eyes staring at you
Show a mentor, mark the board and claim a prize.