xxxxxxxxxx
35
function setup() {
createCanvas(400, 400);
}
function draw() {
background(200);
// define some random variables with the random function
let randomDiameter = random(100,200);
let randomStrokeWeight = random(3,20);
let randomRed = random(0,255);
let randomGreen = random(0,255);
let randomBlue = random(0,255);
let randomX = random(0,width);
let randomY = random(0,height);
// define a random strokeWeight
// using the randomStrokeWeight variable
// inside the strokeWeight function
strokeWeight(randomStrokeWeight);
// define a random fill color
// using the random values of red green and blue
// inside the fill function
fill(randomRed, randomGreen, randomBlue);
// define a random diameter for the circle
// using the randomDiameter variable
// inside the circle function
// AND define a random position for that circle
// using the randomX and randomY
circle(randomX, randomY, randomDiameter);
}