Platform
Resources
Pricing
Sign in
Contact us
Harry Stevens
News and graphics at @ClimateLab, a project of @PostGraphics.
Workspace
Fork
Public
Geometric.js
By
Harry Stevens
Edited
Jan 22
MIT
Insert cell
Insert cell
Insert cell
interpolator
=
geometric
.
polygonInterpolate
(
polygon
)
Insert cell
Insert cell
Insert cell
Insert cell
polygon
=
polygons
[
selection
.
toLowerCase
(
)
]
Insert cell
point
=
interpolator
(
i
)
Insert cell
polygons
=
(
{
random
:
geometric
.
polygonRandom
(
sides
,
area
,
[
size
/
2
,
size
/
2
]
)
,
regular
:
geometric
.
polygonRegular
(
sides
,
area
,
[
size
/
2
,
size
/
2
]
)
}
)
Insert cell
Insert cell
area
=
size
**
2
/
3
Insert cell
size
=
Math
.
min
(
width
,
500
)
Insert cell
Insert cell
geometric
=
require
(
"geometric@2.3.3"
)
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
i
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
interpolator
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
selection
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
sides
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
polygon
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
point
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
polygons
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
area
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
size
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
geometric
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML