Platform
Resources
Pricing
Sign in
Contact us
Fil
Vocateur.
Workspace
Fork
Published
2 collections
By
Fil
Edited
Jul 7, 2021
Fork of
Miller Oblated Stereographic GLSL
•
1 fork
1
Insert cell
Insert cell
Insert cell
Insert cell
projection
=
d3
.
geoProjection
(
d3
.
geoModifiedStereographicRaw
(
coeffs
,
[
165
,
10
,
0
]
)
)
.
rotate
(
[
165
,
10
,
0
]
)
.
center
(
[
0
,
23
]
)
.
clipAngle
(
130
)
.
precision
(
0.1
)
.
scale
(
width
*
0.25
)
Insert cell
graticule
=
d3
.
geoGraticule
(
)
.
step
(
[
10
,
10
]
)
.
extent
(
[
[
-
40
,
-
40
]
,
[
80
,
80
]
]
)
Insert cell
coeffs
=
[
[
0.721316
,
0
]
,
[
0
,
0
]
,
[
-
0.00881625
,
-
0.00617325
]
]
Insert cell
preamble
=
(
)
=>
`
void coeff(in int j, inout float a, inout float b) {
${
coeffs
.
map
(
(
w
,
i
)
=>
`
if (j == ${
i
}) {
a = ${
w
[
0
]
.
toFixed
(
6
)
};
b = ${
w
[
1
]
.
toFixed
(
6
)
};
}`
)
.
join
(
""
)
}
}
`
Insert cell
// https://visibleearth.nasa.gov/images/74343/may-blue-marble-next-generation-w-topography/74353l
image
=
FileAttachment
(
"world.topo.200405.3x5400x2700.jpg"
)
.
image
(
)
.
then
(
d
=>
Object
.
assign
(
d
,
{
style
:
"max-height:100px"
}
)
)
Insert cell
height
=
(
width
*
0.667
)
|
0
Insert cell
import
{
reglCanvas
,
createDrawCommand
,
regl
}
with
{
width
,
height
,
projection
,
glproj
,
preamble
,
image
}
from
"@fil/phytoplankton"
Insert cell
d3
=
require
(
"d3@7"
,
"d3-geo-projection@3"
,
"d3-geo-polygon@1"
)
Insert cell
import
{
checkbox
,
radio
,
select
}
from
"@jashkenas/inputs"
Insert cell
import
{
atan2
,
cos
,
degrees
,
halfPi
,
radians
,
sin
,
sqrt
}
from
"@fil/math"
Insert cell
land
=
d3
.
json
(
"https://unpkg.com/visionscarto-world-atlas@0.0.6/world/50m_countries.geojson"
)
.
then
(
d
=>
d
.
features
.
filter
(
d
=>
d
.
properties
.
su_a3
===
"USA"
)
[
0
]
)
Insert cell
import
{
fullscreen
}
from
"@fil/fullscreen"
Insert cell
fullscreen
(
canvas
)
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
Compare fork
Fork
View
Export
Listed in...
GLSL projections
Fil
Projections
Fil
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
canvas
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
glproj
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
projection
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
graticule
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
coeffs
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
preamble
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
image
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
height
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
land
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML