Platform
Resources
Pricing
Sign in
Contact us
Sander Evers
Workspace
Fork
Published
2 collections
By
Sander Evers
Edited
Oct 14, 2020
1 fork
19 stars
hex
Hexagon tiling of an hexagonal grid
Hexmod representation
Hex edges
Hex grid
Solo board game
Also listed in…
isometric
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function
edge
(
tileA
,
tileB
)
{
const
[
ax
,
ay
,
az
]
=
tileA
;
const
[
bx
,
by
,
bz
]
=
tileB
;
return
[
(
ax
+
bx
)
/
2
,
(
ay
+
by
)
/
2
,
(
az
+
bz
)
/
2
]
;
}
Insert cell
Insert cell
function
tiles
(
edge
)
{
const
[
ex
,
ey
,
ez
]
=
edge
;
const
[
ax
,
ay
]
=
[
ex
+
mod2
(
ex
)
,
ey
-
mod2
(
ey
)
]
;
const
[
bx
,
by
]
=
[
ex
-
mod2
(
ex
)
,
ey
+
mod2
(
ey
)
]
;
return
[
[
ax
,
ay
,
-
(
ax
+
ay
)
]
,
[
bx
,
by
,
-
(
bx
+
by
)
]
]
;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mod2
=
n
=>
Math
.
abs
(
n
%
2
)
Insert cell
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.
Try it for free
Learn more
Fork
View
Export
Listed in...
hex
Sander Evers
isometric
Sander Evers
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
ew
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
cam
Edit
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
edge
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
tiles
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
halfhexcube
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
fillcube
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
corners
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
hexrotate
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
changingView
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mod2
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
range
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
v
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML