Published
Edited
Oct 18, 2019
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
colorString = `${rayBaseColor} ${rayMidColor} ${rayEdgeColor} ${backgroundColor} ${pupilColor}`
Insert cell
d3 = require("d3@5", "d3-random@2")
Insert cell
Insert cell
function gaussian(x) {
var gaussianConstant = 1 / Math.sqrt(2 * Math.PI),
mean = 0,
sigma = 1.5;

x = (x - mean) / sigma;
return gaussianConstant * Math.exp(-.5 * x * x) / sigma;
};
Insert cell
gaussian(5)
Insert cell
function spiralLength(n) {
return d3.range(n).map((x) => x/(n-1))
}
Insert cell
function spiralLengthNever0(n) {
return d3.range(n).map((x) => (x+1) / n)
}
Insert cell
spiralLength(6)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
tinycolor = require("tinycolor2@1.4.1")
Insert cell
Pickr = require("pickr-widget@0.2.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