Published
Edited
Dec 8, 2019
Insert cell
md`# Rothko`
Insert cell
import {p5} from "@tmcw/p5";
Insert cell


p5(sketch => {
sketch.setup = function() {
sketch.createCanvas(400, 450);
sketch.noStroke();
sketch.smooth();
sketch.colorMode(sketch.HSB, 100);
sketch.hue1 = 0;
sketch.hue2 = 50;

};

sketch.draw = function() {
sketch.frameRate(10)
sketch.background("#707070");
sketch.fill(sketch.hue1,40,50);
sketch.rect(20, 20, 360, 270);
sketch.fill(sketch.hue2,40,50);
sketch.rect(20, 310, 360, 120);
sketch.filter(sketch.BLUR, 3)
sketch.hue1 <= 100 ? sketch.hue1++ : sketch.hue1 = 0;
sketch.hue2 <= 100 ? sketch.hue2++ : sketch.hue2 = 0;
};
})


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