From 28994509cc11ac6a5443054dfae1fedfb69039bc Mon Sep 17 00:00:00 2001 From: rsc Date: Wed, 21 Apr 2004 22:19:33 +0000 Subject: Why not? --- src/cmd/map/libmap/orthographic.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/cmd/map/libmap/orthographic.c (limited to 'src/cmd/map/libmap/orthographic.c') diff --git a/src/cmd/map/libmap/orthographic.c b/src/cmd/map/libmap/orthographic.c new file mode 100644 index 00000000..7aac5b15 --- /dev/null +++ b/src/cmd/map/libmap/orthographic.c @@ -0,0 +1,35 @@ +#include +#include +#include "map.h" + + +int +Xorthographic(struct place *place, double *x, double *y) +{ + *x = - place->nlat.c * place->wlon.s; + *y = - place->nlat.c * place->wlon.c; + return(place->nlat.l<0.? 0 : 1); +} + +proj +orthographic(void) +{ + return(Xorthographic); +} + +int +olimb(double *lat, double *lon, double res) +{ + static int first = 1; + if(first) { + *lat = 0; + *lon = -180; + first = 0; + return 0; + } + *lon += res; + if(*lon <= 180) + return 1; + first = 1; + return -1; +} -- cgit v1.2.3