xxxxxxxxxx
29
/*
Assignment 2
Name: Fuad Thabit
*/
let angle = 0;
let scalar = 0;
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
}
function draw() {
noStroke();
fill (255);
//This draws ellipses and increases the angle and distance
//from the one last drawn
for (let i = 0; i < 10; i++){
let x = cos(angle) * scalar;
let y = sin (angle) * scalar;
let dist = 200 * i/2;
ellipse(x + dist , y + dist, 3, 3);
scalar += 0.04;
angle += i;
}
}