Other Landscapes

24Jan11

Perlin noise curves generated in processing.

Play with the live version here.

float nxScale;
float nyScale;
float n=0;
float t;
int w = 800;
int h = 300;

void setup(){
  size(800, 300);
  smooth();
}

void draw(){
  background(25);
  noFill();
  for(float j=0; j<h; j+=4){
    beginShape(POLYGON);
    for(float i=0; i<w; i+=4){
      nxScale = w/2;
      nyScale = h/2;
      n = noise(i/nxScale, j/nyScale, t/nxScale)*255;
      stroke(n, 200);      
      curveVertex(i, j+n);
    }
    endShape();
  }
  float mx = map(mouseX, 0, w, 0.5, 4);

  t+=mx;

  stroke(30, 155, 200);
  rectMode(CENTER);
  rect(mouseX, 5, 5, 5);
}
Advertisements


2 Responses to “Other Landscapes”

  1. 1 DAVID DEL VALLE

    CONGRATULATIONS ADMIRE YOUR WORk


  1. 1 Tweets that mention Other Landscapes « Henderson:Media -- Topsy.com

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s


%d bloggers like this: