Public
Edited
Apr 29, 2022
5 stars
Cards as NotesTile Matching
Generated Iconography Exploration #1
Splitting Shapes
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof size = Inputs.range([500, 2000], {label: "zoom"})
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
FileAttachment("image@8.png").image()
Insert cell
Insert cell
r = 20
Insert cell
Insert cell
Insert cell
function polygon ({numSides = 3, fill = "black", stroke="none", center, size = r, theta = 0}) {
const points = [...Array(numSides).keys()]
.map(i => ((2 * Math.PI * i/ numSides) + theta) % (2 * Math.PI))
.map(d => [
Math.cos(d) * size + center[0],
Math.sin(d) * size + center[1]
]
);
const pointsStr = points
.map(p => p.join(","))
.reduce((m, e) => `${m.trim()} ${e}`, "");
return htl.svg.fragment`<polygon points="${pointsStr}" fill="${fill}"/>`
}
Insert cell
function starryGon ({numSides = 3, fill = "black", stroke="none", center, size = r, theta = 0}) {
const points = [...Array(numSides).keys()]
.map(i => ((4 * Math.PI * i/ numSides) + theta))
.map(d => [
Math.cos(d) * size + center[0],
Math.sin(d) * size + center[1]
]
);
const pointsStr = points
.map(p => p.join(","))
.reduce((m, e) => `${m.trim()} ${e}`, "");
return htl.svg.fragment`<polygon points="${pointsStr}" fill="${fill}"/>`
}
Insert cell
function i_to_center(i) {
const x = 2 * r * i + r;
const y = 2 * r * Math.floor(x / width) + r ;
return [x % width, y];
}
Insert cell
Insert cell
height = 200
Insert cell
width = 900
Insert cell
{
const baseShapes = [
{ numSides: 3, }
];
}
Insert cell
# References
https://observablehq.com/@d3/color-schemes
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