diff --git a/java/examples/Basics/Color/RadialGradient2/RadialGradient2.pde b/java/examples/Basics/Color/RadialGradient/RadialGradient.pde similarity index 97% rename from java/examples/Basics/Color/RadialGradient2/RadialGradient2.pde rename to java/examples/Basics/Color/RadialGradient/RadialGradient.pde index ad571fcc0..2c0b7c097 100644 --- a/java/examples/Basics/Color/RadialGradient2/RadialGradient2.pde +++ b/java/examples/Basics/Color/RadialGradient/RadialGradient.pde @@ -6,7 +6,7 @@ int dim = 40; void setup() { - size(200, 200); + size(640, 360); background(0); smooth(); noStroke(); diff --git a/java/examples/Basics/Color/Reading/Reading.pde b/java/examples/Basics/Color/Reading/Reading.pde deleted file mode 100644 index d142aff88..000000000 --- a/java/examples/Basics/Color/Reading/Reading.pde +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Reading. - * - * An image is recreated from its individual component colors. - * The many colors of the image are created through modulating the - * red, green, and blue values. This is an exageration of an LCD display. - */ - -size(200, 200); -noStroke(); -background(0); - -// Load an image from the data directory -PImage img = loadImage("cait.jpg"); -img.loadPixels(); - -// figure out how big to make each block based on -// the sketch area and the size of the input image -int eachW = width / img.width; -int eachH = height / img.height; -int each = min(eachW, eachH); -// vertical stripes will be a third as wide -int stripeW = each / 3; -// make sure the block size is a multiple of 3 -each = 3 * stripeW; - -int left = (width - (img.width * each)) / 2; -int top = (height - (img.height * each)) / 2; - -for (int y = 0; y < img.height; y++) { - int y1 = top + y*each; - - for (int x = 0; x < img.width; x++) { - int pixel = img.get(x, y); - int x1 = left + x*each; - - fill(red(pixel), 0, 0); - rect(x1 + stripeW*0, y1, stripeW, each); - - fill(0, green(pixel), 0); - rect(x1 + stripeW*1, y1, stripeW, each); - - fill(0, 0, blue(pixel)); - rect(x1 + stripeW*2, y1, stripeW, each); - } -} diff --git a/java/examples/Basics/Color/WaveGradient/WaveGradient.pde b/java/examples/Basics/Color/WaveGradient/WaveGradient.pde index eac305093..19cc4a599 100644 --- a/java/examples/Basics/Color/WaveGradient/WaveGradient.pde +++ b/java/examples/Basics/Color/WaveGradient/WaveGradient.pde @@ -13,8 +13,8 @@ float fillGap = 2.5; color c; void setup() { - size(200, 200); - background(200,200,200); + size(640, 360); + background(200); noLoop(); } @@ -23,13 +23,13 @@ void draw() { // Reset angle to 0, so waves stack properly angle = 0; // Increasing frequency causes more gaps - frequency+=.006; - for (float j=0; j