From 868e904f16ce1650a6ffa55e4e3c4bbf4e085bdb Mon Sep 17 00:00:00 2001 From: Casey Reas Date: Fri, 16 Sep 2011 06:09:24 +0000 Subject: [PATCH] Removing extrusion example --- .../Image Processing/Extrusion/Extrusion.pde | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 java/examples/Topics/Image Processing/Extrusion/Extrusion.pde diff --git a/java/examples/Topics/Image Processing/Extrusion/Extrusion.pde b/java/examples/Topics/Image Processing/Extrusion/Extrusion.pde deleted file mode 100644 index 89f6e2790..000000000 --- a/java/examples/Topics/Image Processing/Extrusion/Extrusion.pde +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Extrusion. - * - * Converts a flat image into spatial data points and rotates the points - * around the center. - */ - -// @pjs preload must be used to preload media if the program is -// running with Processing.js -/* @pjs preload="moon.jpg"; */ - -PImage extrude; -int[][] values; -float angle = 0; - -void setup() { - size(640, 360, P3D); - - // Load the image into a new array - extrude = loadImage("ystone08.jpg"); - extrude.loadPixels(); - values = new int[extrude.width][extrude.height]; - for (int y = 0; y < extrude.height; y++) { - for (int x = 0; x < extrude.width; x++) { - color pixel = extrude.get(x, y); - values[x][y] = int(brightness(pixel)); - } - } -} - -void draw() { - background(0); - - // Update the angle - angle += 0.005; - - // Rotate around the center axis - translate(width/2, 0, -128); - rotateY(angle); - translate(-extrude.width/2, 100, -128); - - // Display the image mass - for (int y = 0; y < extrude.height; y++) { - for (int x = 0; x < extrude.width; x++) { - stroke(values[x][y]); - point(x, y, -values[x][y]); - } - } - -}