aitoff.c 397 B

1234567891011121314151617181920212223242526
  1. #include <u.h>
  2. #include <libc.h>
  3. #include "map.h"
  4. #define Xaitwist Xaitpole.nlat
  5. static struct place Xaitpole;
  6. static int
  7. Xaitoff(struct place *place, double *x, double *y)
  8. {
  9. struct place p;
  10. copyplace(place,&p);
  11. p.wlon.l /= 2.;
  12. sincos(&p.wlon);
  13. norm(&p,&Xaitpole,&Xaitwist);
  14. Xazequalarea(&p,x,y);
  15. *x *= 2.;
  16. return(1);
  17. }
  18. proj
  19. aitoff(void)
  20. {
  21. latlon(0.,0.,&Xaitpole);
  22. return(Xaitoff);
  23. }