---
# System prepended metadata

title: Untitled

---

function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(220);
  line(20, 20, 380, 380);
}
function setup() {
  createCanvas(400, 400);
}

function draw() {
  var points = [    [30, 20],
    [85, 75],
    [150, 40],
    [200, 100],
    [250, 20]
  ];
  
  for (var i = 0; i < points.length - 1; i++) {
    line(points[i][0], points[i][1], points[i + 1][0], points[i + 1][1]);
  }
}function setup() {
  createCanvas(400, 400);
  background(220);

  // 設定 (0,0) 原點座標在視窗中心點
  translate(width / 2, height / 2);

  // 繪製一個正方形
  rect(0, 0, 50, 50);
}
