Files
sunny9898/task8/_ref/noc-examples-processing-master/chp03_oscillation/ExtraOscillatingUpAndDown/ExtraOscillatingUpAndDown.pde
louiscklaw 5637fbf94f update,
2025-02-01 02:07:58 +08:00

16 lines
218 B
Plaintext

float angle = 0;
void setup() {
size(400,400);
}
void draw() {
background(255);
float y = 100*sin(angle);
angle += 0.02;
fill(127);
translate(width/2,height/2);
line(0,0,0,y);
ellipse(0,y,16,16);
}