Note for Class and Video

Tidy code → command+shift+F

randomSeed() 是什麽意思? 可以讓random flashing變規律?

function 裡面的translate(x, 10) 是怎麼操作的?

randomSeed → When need to lock in a randomly generated result for exact reproduction, using randomSeed ensures that the sequence of random numbers remains identical every time it runs.

截圖 2026-10-02 晚上9.08.19.png

https://editor.p5js.org/kc6538/full/qtJcSWDpD

Video Note:

let circle= {x:0, y:100, diameter:50}

ellipse(circle.x, circle.y, circle.diameter, circle.diameter);

Homework

  1. Organize the example Zoog portrait into functions so that you can understand what it’s doing without right comments and you can easily turn different parts of the sketch on/off by commenting in/out calls to your functions.