Friday, June 30, 2017

Example 9 - Point

// Example 9 - Point

function setup() {

  createCanvas(640, 480);
  // gray background
  background(192);

  // magenta stroke of 50
  stroke(255, 0, 255);
  strokeWeight(50);
  
  // top-left
  point(0.25*width, 0.25*height);
  
  // top-right
  point(0.75*width, 0.25*height);

  // bottom-left
  point(0.25*width, 0.75*height);

  // bottom-right
  point(0.75*width, 0.75*height);
}

Output:


No comments:

Post a Comment