---
# System prepended metadata

title: Untitled

---

期中考報告
void setup() {
  size(6000, 6000);    //窗口大小，寬6000，高6000
  background(255);   //背景白色
  smooth();          //鋸齒
  frameRate(30);     //每秒畫30次
}

void draw(){
  //背景白色
  //之前的内容全部被白色覆蓋
  background(255);
  
  //設置橢圓和四邊為CENTER
  ellipseMode(CENTER);
  rectMode(CENTER);
  
  //身體
  //mouseX -> Ｘ軸座標
  //mouseY -> Ｙ軸座標
  stroke(0);
  fill(200);
  rect(mouseX, mouseY, 20, 100);
  
  //頭部
  fill(205);
  ellipse(mouseX, mouseY-30, 90, 60);
  
  //眼睛
  fill(0);
  ellipse(mouseX-19, mouseY-30, 16, 32);
  ellipse(mouseX+19, mouseY-30, 16, 32);
  
  //腿
  //pmouseX -> x軸
  //pmouseY -> y軸
  stroke(0);
  line(mouseX-10, mouseY+50, pmouseX-10, pmouseY+60);
  line(mouseX+10, mouseY+50, pmouseX+10, pmouseY+60);
}
![](https://i.imgur.com/saZG5N1.gif)
