|
|
1.1 root 1: #include "map.h"
2: /* refractive fisheye, not logarithmic */
3:
4: static double n;
5:
6: static int
7: Xfisheye(struct place *place, double *x, double *y)
8: {
9: double r;
10: double u = sin(PI/4-place->nlat.l/2)/n;
11: if(fabs(u) > .97)
12: return -1;
13: r = tan(asin(u));
14: *x = -r*place->wlon.s;
15: *y = -r*place->wlon.c;
16: return 1;
17: }
18:
19: proj
20: fisheye(double par)
21: {
22: n = par;
23: return n<.1? 0: Xfisheye;
24: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.