Published
Edited
Apr 11, 2020
1 fork
Importers
8 stars
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
// replace `img = imgDavid` with `img = imGradientColor` to see a color test image instead
img = imgDavid
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
getAlternatingThreshold = {
const thresholds2x2 = [
1,2,
2,1
].map(v => 85*v);
function get2x2threshold(x, y) {
return thresholds2x2[(x&1) + ((y&1)<<1)];
}
get2x2threshold.label = "2×2"
return get2x2threshold;
}
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {hcurveIndices} from "@jobleonard/a-simple-algorithm-to-generate-h-curves"
Insert cell
import {hicurveIndices} from "@jobleonard/the-hi-curve"
Insert cell
david = await FileAttachment("david2.jpg")
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