Published
Edited
Dec 7, 2018
1 star
Insert cell
Insert cell
Insert cell
Insert cell
sketch = p => {
p.setup = () => {
p.createCanvas(width, 600)
p.noStroke()
p.noLoop()
};
p.draw = () => {
drawCircle(width/2, 280, 6)
}
function drawCircle(x, radius, level) {
p.fill(`rgba(255, ${level*30}, 0, ${0.1})`)
p.ellipse(x, p.height/2, radius*2, radius*2)
if(level > 1) {
level = level - 1
drawCircle(x - radius/2, radius/2, level)
drawCircle(x + radius/2, radius/2, level)
}
}
}
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