xxxxxxxxxx
27
/********************************************************************************
Zenek Chapman
Computer Science 30
October 17 2024
This code creates an image full of circles that vary in size colour, and transparency
******************************************************************************/
function setup() {
createCanvas(400, 400);
background(220);
frameRate(20)
}
function draw() {
circDraw()//draw the circle every frame
}
function circDraw(){ //setup the circle
size = random(5, 100)
r = random(0, 255)
g = random(0, 255)
b = random(0, 255)
xpos = random(0, 400)
ypos = random(0, 400)
alphaValue = random(0, 255 )
fill(r, g, b, alphaValue)
circle(xpos, ypos, size)
}