Published
Edited
Feb 24, 2021
1 fork
6 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function makeRhombus(angle, edgeLength, offset) {
const rhombus = new Path2D();
const vx = edgeLength * Math.sin(angle / 2);
const vy = edgeLength * Math.cos(angle / 2);
rhombus.moveTo(0, -offset);
rhombus.lineTo(vx, -vy - offset);
rhombus.lineTo(0, -vy * 2 - offset);
rhombus.lineTo(-vx, -vy - offset);
rhombus.lineTo(0, -offset);
return rhombus;
}
Insert cell
function makeArcTile(angle, edgeLength, offset) {
const tile = new Path2D();
}
Insert cell
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