xxxxxxxxxx
37
let a = 0.3;
let b = 0.5;
let t = 0.2;
let size;
function setup() {
createCanvas(windowWidth, windowHeight);
strokeWeight(5);
stroke('cyan');
fill('cyan');
size = min(width/10, height/10);
}
function draw() {
background(0, 5);
let xAmp = width * 0.5;
let yAmp = height * 0.5;
// let xShift = width/4;
let xShift = width/10;
let yShift = height/2;
// let x = xAmp * sin(a*t) + xShift;
let x = xAmp * sin(a*t) * xShift;
let y = yAmp * cos(b*t) + yShift;
point(x,y);
line(x,y,width/2, height/2);
// line(x,y,mouseX,mouseY);
circle(x,y,50);
square(x+60,y+60,50);
// triangle(width/2, height/2, x, y, x, y);
// triangle(width/2, height/2, x, y, 0, height);
t += 0.1;
}