Wednesday, August 21, 2013

Processing example: bezier()

Processing example: bezier()
Processing example: bezier()

void setup(){
  size(400, 300);
  background(0);
  stroke(255);
}

void draw() {

  noFill();
  
  if(mousePressed){
    background(0);
    point(mouseX, mouseY);
    line(80, 50, mouseX, mouseY);
    line(50, 200, 350, 250);
    bezier(80, 50, mouseX, mouseY, 50, 200, 350, 250);

  }
  
}

No comments:

Post a Comment