Platform
Resources
Pricing
Sign in
Contact us
Mike Bostock
Visualization toolmaker. Founder @observablehq. Creator @d3. Former @nytgraphics. Pronounced BOSS-tock.
Workspace
Fork
Published
Geometry
By
Mike Bostock
Edited
Jan 29, 2018
3 forks
Importers
25 stars
Geometry
Circular Segment
Packing Circles inside a Rectangle
Radical Axis
Rounded Convex Polygon
Point-Box Collision
Urquhart Graph
Random Points on a Sphere
Spherical Fibonacci Lattice
Apollonian Gasket
Soddy Circles
19-Circle
Circle Offset Along Line
Closest Point on Line
Circumcircle
Tangent to Two Circles
Circle Tangent to Three Lines
Angle Bisector of Two Lines
Convex Polygon Incircle
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function
distance
(
[
x1
,
y1
]
,
[
x2
,
y2
]
)
{
return
Math
.
sqrt
(
(
x2
-
x1
)
**
2
+
(
y2
-
y1
)
**
2
)
;
}
Insert cell
function
interpolate
(
[
x1
,
y1
]
,
[
x2
,
y2
]
,
t
)
{
return
[
x1
+
(
x2
-
x1
)
*
t
,
y1
+
(
y2
-
y1
)
*
t
]
;
}
Insert cell
function
project
(
[
x1
,
y1
]
,
[
x2
,
y2
]
,
[
x3
,
y3
]
)
{
const
x21
=
x2
-
x1
,
y21
=
y2
-
y1
;
const
x31
=
x3
-
x1
,
y31
=
y3
-
y1
;
return
(
x31
*
x21
+
y31
*
y21
)
/
(
x21
*
x21
+
y21
*
y21
)
;
}
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
distance
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
interpolate
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
project
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML