diff --git a/java/examples/Books/Processing Handbook/Synthesis/Synthesis_01_collage_01/_01_collage.pde b/java/examples/Books/Processing Handbook/Synthesis/Synthesis_01_collage_01/_01_collage.pde new file mode 100644 index 000000000..a1fa62960 --- /dev/null +++ b/java/examples/Books/Processing Handbook/Synthesis/Synthesis_01_collage_01/_01_collage.pde @@ -0,0 +1,26 @@ +/** + * Synthesis 1: Form and Code, + * Collage Engine by Casey Reas (www.processing.org) + * p. 150 + * + * Step 1, working with one image. +*/ + +// Load the image +PImage nyt01 = loadImage("nyt_01.jpg"); + +float x, y; // Image position +float r; // Image rotation + +size(400, 300); +background(255); +tint(255, 204); + +x = random(width); // Set random x-coordinate +y = random(height); // Set random y-coordinate +r = random(0, TWO_PI); // Set random rotation +pushMatrix(); +translate(x, y); +rotate(r); +image(nyt01, -nyt01.width/2, -nyt01.height/2); +popMatrix(); diff --git a/java/examples/Books/Processing Handbook/Synthesis/_01_collage/_02_collage/_02_collage.pde b/java/examples/Books/Processing Handbook/Synthesis/Synthesis_01_collage_02/_02_collage.pde similarity index 100% rename from java/examples/Books/Processing Handbook/Synthesis/_01_collage/_02_collage/_02_collage.pde rename to java/examples/Books/Processing Handbook/Synthesis/Synthesis_01_collage_02/_02_collage.pde