5 static struct place gywhem, gyehem;
6 static struct coord gytwist;
7 static double gyconst, gykc, gyside;
11 dosquare(double z1, double z2, double *x, double *y)
15 if(fabs(w1*w1+z2*z2)>.000001) {
16 cdiv(z1+1,z2,w1,z2,&w1,&w2);
21 elco2(w1,w2,gykc,1.,1.,x,y);
29 Xguyou(struct place *place, double *x, double *y)
31 int ew; /*which hemisphere*/
36 norm(&pl,ew?&gyehem:&gywhem,&gytwist);
37 Xstereographic(&pl,&z1,&z2);
38 dosquare(z1/2,z2/2,x,y);
48 gykc = 1/(3+2*sqrt(2.));
49 gyconst = -(1+sqrt(2.));
50 elco2(-gyconst,0.,gykc,1.,1.,&gyside,&junk);
52 latlon(0.,90.,&gywhem);
53 latlon(0.,-90.,&gyehem);
59 guycut(struct place *g, struct place *og, double *cutlon)
62 c = picut(g,og,cutlon);
66 if(g->nlat.c<.7071||og->nlat.c<.7071)
67 return(ckcut(g,og,0.));
72 Xsquare(struct place *place, double *x, double *y)
82 if(p.nlat.l<FUZZ && fabs(p.wlon.l)>PI-FUZZ){
84 *x = p.wlon.l>0?0:gyside;
87 Xstereographic(&p,&z1,&z2);
88 r = sqrt(sqrt(hypot(z1,z2)/2));
89 theta = atan2(z1,-z2)/4;
90 dosquare(r*sin(theta),-r*cos(theta),x,y);