Tag Archives: processing

kaleidoscope – code of the main tab

PImage inputImage,outputImage; Coordinates screenCoordinates,inputCoordinates,outputCoordinates; ColorLookup inputColor; MakeScreenImage makeScreenImage; MakeOutputImage makeOutputImage; Kaleidoscope kaleidoscope; int lastMouseX,lastMouseY; boolean dragged=false; void setup() {   size(600, 600);   smooth();   readImage();   int outputMagnification=1;                                  // no magnification for blog                                                               //  choose large value (about … Continue reading

Posted in programming | Tagged , , | Leave a comment

putting the kaleidoscope together

We now create a rather versatile kaleidoscope. Upon starting, the program lets us choose an image file and we will look through the kaleidoscope at this image. To get a large variety of pictures we interactively manipulate the input image … Continue reading

Posted in Kaleidoscopes, programming | Tagged , , | 1 Comment

class kaleidoscope – the code

class Kaleidoscope{   float periodX,periodY,side;   float rt32=sqrt(3.)/2;   float rt3=sqrt(3);   int choice;   final int RECTANGLE=0,THESQUARE=1,EQUITRIANGLE=2,RIGHTTRIANGLE=3;   Kaleidoscope(){   }    //—————————————————————————   //initialization and choice of kaleidoscope       //  rectangular kaleidoscope     void chooseRectangle(float cellWidth,float … Continue reading

Posted in Kaleidoscopes, programming | Tagged , , | Leave a comment

class MakeScreenImage – the code

class MakeScreenImage{   Vector[] mappedVectors; // needs our improved class Vector       MakeScreenImage(){   }      //  often images result from two steps: first a transformation maps the pixel position    Vector mapVector(float i,float j){    Vector … Continue reading

Posted in programming | Tagged , | Leave a comment

class MakeOutputImage – the code

//  this class is a framework for generating output images //needs the class ProgressReport class MakeOutputImage{   ProgressReport progress;   PImage thisImage;   int thisWidth, thisHeight;   int rot,gruen,blau;   int startTime,lastTime;     int[] inRed,inGreen,inBlue;   int[] redPlus,redZero,redMinus;   … Continue reading

Posted in programming | Tagged , , , , | Leave a comment

class ProgressReport – the code

class ProgressReport{   int startTime,lastTime,end;   String message;     ProgressReport(int e,String m){    // task goes from 0 to e, m is a message   end=e;   message=m;   }     void reset(){     startTime=millis();     lastTime=startTime;   } … Continue reading

Posted in programming | Tagged , | Leave a comment

The class ProgressReport

This is nothing great, just one of my little helpers. It may take a lot of time to make a high resolution output image of say 6000×6000 pixels with anti-aliasing and cubic interpolation. Then we need some information on the … Continue reading

Posted in programming | Tagged , | Leave a comment