tut­o­r­i­a­l­1­0

by chris Huang
  • Show Sketch
/** @peep sketchcode */
 
void setup() {
  size(200, 200);
  background(20, 50, 150);
}
 
void draw() {
  // Fade the background
  if (frameCount % 10 == 0) {
    strokeWeight(8);
    fill(0, 10);
    rect(0, 0, width, height);
  }
  // Calculate position based on the noise function
  float x = width * noise(frameCount * 0.027);
  float y = height * noise(frameCount * 0.019);
  // Draw the point
  stroke(255);
  strokeWeight(3);
  point(x, y);
}

Comments

Nobody has said anything yet.