Interaktives Plakat Malstil Version 1

IsabellPullwitt

Der erste Versuch Feiningers “Prismaismus” interaktiv umzusetzen.

int myRaster =10 ;
 
 
 
void setup(){
  size(640,480);///1024,768
background(0,40,60,0);
 
 
 
}
 
 
 
 
void draw(){
  rectMode(CENTER);
  rect(mouseX,mouseY,pmouseX,pmouseY);
  noStroke();
 
 
  int myRasterX = mouseX / myRaster * myRaster;
  int myRasterY = mouseY / myRaster * myRaster;
 
 // println("x: " +myRasterX + "y: " +myRasterY);
 
 
 // irgendwie gewählte Berechnung der Farbe
 
  int myRedComponent = (int)(10 * myRasterX/ width);
   int myGreenComponent = (int)(80 * myRasterY/ height);
    int myBlueComponent = (100);
 
 
color myColor = color(myRedComponent,myGreenComponent,myBlueComponent); 
 
noStroke();
fill(myColor);
rect(myRasterX,myRasterY,myRaster,myRaster);
 
 
 
 
 
 
 
 
 
 
 
}