p5.js

1.6.0
Auto-saved
// This is a sample code for a predictably randomized p5.js project
// Replace with your own code

// Randomizer guidelines:
// 1. Use rand(a,b) instead of random(a,b) to get a predictable random number
// 2. Click on "Play" button to render the same image (with the same random value)
// 3. Click on "Random" button to render a different image (with a different random value)

let x, y;

function setup() {
createCanvas(800, 800);

x = rand(100, 700);
y = rand(100, 700);

colorMode(HSB, 360, 100, 100);
}

function draw() {
background(15);

noStroke();

fill(26, 79, 90);
ellipse(200, 200, 80, 80);

// fill random color
fill(rand(0, 360), 60, 90);
// draw ellipse in random position
ellipse(x, y, 80, 80);
noLoop();
preview();
}


Console