xxxxxxxxxx
let center
let w
function setup() {
createCanvas(windowWidth, windowHeight)
colorMode(HSB)
center = createVector(windowWidth * 0.5,windowHeight * 0.5)
w = 0.5*windowWidth
background(100)
}
function makeVertex() {
let v = p5.Vector.random2D()
let g = randomGaussian(100,50)
v.mult(g)
v.add(center)
return v
}
function draw() {
let a = makeVertex()
let b = makeVertex()
let c = makeVertex()
let hue = random(360)
let col = color(hue,50, 100);
col.setAlpha(0.07)
// Draw the left rectangle.
noStroke();
fill(col);
triangle(a.x,a.y,b.x,b.y,c.x,c.y)
}