Public
Edited
Apr 22, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
pts = {
if (example == "Right triangle") {
return [
[0, 0],
[3, 0],
[0, 2]
];
} else if (example == "Oblique triangle") {
return [
[0, -2],
[2, 2],
[1, 3]
];
}
if (example == "Irregular octagon") {
return [
[-5, -5],
[0, -1],
[2, -2],
[4, 2],
[1, 3],
[-3, 3],
[-4, -2],
[-6, -1]
];
}
}
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