|
Last change
on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Prototype 1.1
|
-
Property mode
set to
100644
|
|
File size:
445 bytes
|
| Line | |
|---|
| 1 | import {atan, cos, sin} from "../math.js";
|
|---|
| 2 | import {azimuthalInvert} from "./azimuthal.js";
|
|---|
| 3 | import projection from "./index.js";
|
|---|
| 4 |
|
|---|
| 5 | export function stereographicRaw(x, y) {
|
|---|
| 6 | var cy = cos(y), k = 1 + cos(x) * cy;
|
|---|
| 7 | return [cy * sin(x) / k, sin(y) / k];
|
|---|
| 8 | }
|
|---|
| 9 |
|
|---|
| 10 | stereographicRaw.invert = azimuthalInvert(function(z) {
|
|---|
| 11 | return 2 * atan(z);
|
|---|
| 12 | });
|
|---|
| 13 |
|
|---|
| 14 | export default function() {
|
|---|
| 15 | return projection(stereographicRaw)
|
|---|
| 16 | .scale(250)
|
|---|
| 17 | .clipAngle(142);
|
|---|
| 18 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.