Published
Edited
Aug 18, 2021
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
c = p5(sketch => {
let np = 0
sketch.setup = function() {
sketch.createCanvas(w+circle_size,h+circle_size,sketch.P2D)
// console.log(sketch.HSB)
sketch.colorMode('hsb')

sketch.noStroke()
};
sketch.draw = function() {
sketch.blendMode(sketch.ADD)
sketch.background(255)
sketch.blendMode(sketch.HARD_LIGHT)
for (let x = 0; x < w; x+=circle_size ) {
for (let y = 0; y < h; y+=circle_size) {
let n = sketch.noise(x/99,y/99+np)
let ns = n*circle_size*Csize
sketch.fill(sketch.noise(x/w,y/w+(np*0.25),np)*(360*Cspread)%360,Csat,Cbri)

NoSh?sketch.rect(x,y,circle_size):CorR?sketch.rect(x,y,ns):sketch.circle(x+(circle_size/2),y+(circle_size/2),ns)
}
}
np+= 0.025
}
})
Insert cell
w = ~~(width * 0.5)
Insert cell
h = w
Insert cell
circle_size = ~~(w * Ccount)
Insert cell
import {p5} from "@tmcw/p5"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more