float t;
void setup() {
background(20);
size (800, 600);
}
void draw() {
stroke (255);
strokeWeight(1);
translate(width/2, height/2);
colorMode(mouseX, mouseY);
line(x1(t), y2(t), x3(t), y3(t));
point(x1(t), y2(t));
point(x2(t), y1(t));
t++;
}
float x1(float t) {
return sin(t/10) + sin(t/5)*300;
}
float y1(float t) {
return sin(t/500);
}
float x2(float t) {
return sin(t/100) ;
}
float y2(float t) {
return sin(t)*200 ;
}
float x3(float t) {
return sin(t)*10 ;
}
float y3(float t) {
return cos(t)*100;
}
0 comments:
Post a Comment