xxxxxxxxxx
66
//try to find a way to get rid of line
var diam = 0;
var redCol = 225;
var bluCol = 0;
var greCol = 0;
var strLine = 400
//var altOpacity = 0;
var altDiam = 0;
var otherCirc = 0;
var opacity = 255;
function setup() {
createCanvas(400, 400);
background(220);
}
function draw() {
background(0,0,0,10);
stroke(redCol,0,0);
line(200,400,200,strLine);
noFill();
stroke(redCol,greCol,bluCol);
if (strLine < 200)
{
ellipse(200,200,diam,diam);
diam = diam + 7;
}
if (diam > 300)
{
ellipse(200,200,altDiam,altDiam)
altDiam = altDiam + 5;
}
if (bluCol > 254)
{
bluCol = 0;
}
if (altDiam > 400)
{
otherCircle();
}
redCol = redCol - 1;
greCol = greCol + 1;
bluCol = bluCol + 1;
strLine = strLine - 1;
//if (otherCirc == 399)
//{
//strLine = 400;
//}
}
function otherCircle () {
background(0,0,0,10);
noStroke();
fill(redCol,greCol,bluCol,opacity);
ellipse(200,200,otherCirc,otherCirc);
otherCirc = otherCirc + 4;
opacity = opacity - 1;
}