Published
Edited
May 31, 2020
1 star
Insert cell
Insert cell
bnb({
w: 540,
h: 540,
numFrames: 100,
record: true,
chromaticAberration: .5,
shutterAngle: 1.8,
samplesPerFrame: 4,
// video: true,
// loops: 3,
draw: (s, t, g) => {
s.background(22)
s.noFill()
s.stroke(255)
s.strokeCap(s.SQUARE)
s.strokeWeight(2)
s.translate(s.width/2, s.height/2)
let tt = t * 2
for(let i = 2; i < 40; i ++) {
const side = s.width - i * 10
const l = side * s.PI / 20
const ttt = (tt + i * .6 * (s.sin(t * s.TAU)/2 + .5)) % 2
if(ttt < 0) s.drawingContext.setLineDash([0, (ttt) * l, l, ...array(100).map(i => l)])
else if(ttt < 1) s.drawingContext.setLineDash([ttt * l, l, ...array(100).map(i => l)])
else s.drawingContext.setLineDash([0, (ttt - 1) * l, l, ...array(100).map(i => l)])
s.circle(0, 0, side)
}
}
})
Insert cell
Insert cell
Insert cell
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