___
tags:程式設計上課作品(a班)第三周
___
# 第三周作品
## 作業1

```javascript=
function setup() {//環境設計
createCanvas(windowWidth, windowHeight);//畫布的寬高為整個視窗
background(100)//設定背景,如果是一個數字(0-255),為灰階,0黑,255白
background(255,0,0)//RGB
background("#faedcd")
}
function draw() {
// background(220);
noFill()//以下畫的元件不要充滿顏色
stroke(241,35,167)
ellipse(width/2,height/2,100,(40*frameCount)%100)//高度不斷變化,畫一個座標在200,100
ellipse(width/2,height/2,(40*frameCount)%100,100)
ellipse(200,300,100,(40*frameCount%100))
ellipse(200,300,(40*frameCount)%50,100)
}
```
### 作業2

```javascript=
function setup() {//環境設計
createCanvas(windowWidth, windowHeight);//畫布的寬高為整個視窗
background(100)//設定背景,如果是一個數字(0-255),為灰階,0黑,255白
background(255,0,0)//RGB
background("#faedcd")
}
function draw() {
// background(220);
noFill()//以下畫的元件不要充滿顏色
stroke(241,35,167)
ellipse(width/2,height/2,100,(40*frameCount)%100)//高度不斷變化,畫一個座標在200,100
ellipse(width/2,height/2,(40*frameCount)%100,100)
ellipse(200,300,100,(40*frameCount%100))
ellipse(200,300,(40*frameCount)%100,100)
ellipse(mouseX,mouseY,100,(40*frameCount)%100)
ellipse(mouseX,mouseY,(40*frameCount)%100,100)
}
```