Some fun with Processing

Been trying out making interesting graphics in processing.

void setup(){
  background(255);
  size(700,500);
  smooth();
    
}

void draw(){
  for(int x=0;x<700;x++){
      for(int y=0;y<+500;y++){
        int red=abs(int(255*(cos(PI/180*x))))%255;        
        int green=abs(int(255*(sin(PI/180*x))))%255;
        int blue=int(red*green)%255;
        
        stroke(red,green,blue);
        rect(x,y,1,1);        
      }
  }  
}

Result

Interestingly, tweaking a few parameters in the above code yeild really psychedellic effects.

Sort of like an optical illusion

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s