let lengths = [50, 150, 250];
let pallete = ["#594F4F", "#547980", "#45ADA8", "#9DE0AD", "#E5FCC2", "#594F4F", "#547980", "#45ADA8"];
let grayscalePallete = [220]
let colouredPallete = ["#594F4F", "#547980", "#45ADA8", "#9DE0AD", "#E5FCC2", "#594F4F", "#547980", "#45ADA8"]
createCanvas(windowWidth, windowHeight);
const numShapes = random(2,5)
for (i = 0; i < numShapes; i++) {
const numVertices = random(3,6)
for (i = 0; i < numVertices; i++) {
randomPoints.push({x: random(-vertexLength, vertexLength),
y: random(-vertexLength, vertexLength)})
defineVertices(randomPoints);
defineSymmetryVertices(randomPoints);
fill(random(0,250), random(0,250), random(0,250))
function defineVertices (randomPoints) {
for (const point of randomPoints) {
vertex(mouseX + point.x, mouseY + point.y);
function defineSymmetryVertices (randomPoints) {
for (const point of randomPoints) {
vertex(width-(mouseX + point.x), (mouseY + point.y));
function shadowsOn(amount = 30) {
drawingContext.shadowBlur = amount;
drawingContext.shadowColor = color(50, 150);
drawingContext.shadowBlur = 0;
vertexLength = lengths[0]
vertexLength = lengths[1]
vertexLength = lengths[2]
pallete = grayscalePallete
pallete = colouredPallete