// sphcoord.h // // by John D. de Boer // Bounds of perspective views and projected spheres typedef struct { real north,south, // bounds of polar coordinate west,east; // bounds of azimuth coordinate } sphererect; typedef struct { sphererect max, // range of coordinate lines appearing in view at all min; // range of coordinate lines which cross view completely bool north, // whether north pole is in view south; // whether south pole is in view } spherebounds; // Type definition for a call-back function typedef void (*sphmapptr)(const projection *P, const vector *V, image *D); // The "spheretask" type. All of the long values in a spheretask are in minutes of arc typedef struct { window *wind; // the window projection *proj; // the projection spherebounds bound; // the coordinate lines which cross the view sphmapptr map; // routine to transform a unit vector on the sphere into view coordinates bool hour; // whether azimuth scale is in hours long lat1, // southern latitude bound lat2, // northern latitude bound long1, // western longitude bound long2, // eastern longitude bound dlat, // spacing of latitude lines dlong, // spacing of longitude lines mlat, // spacing between latitude lines of greater significance mlong, // spacing between longitude lines of greater significance longintv, // spacing of longitude ticks latintv; // spacing of latitude ticks real ticklat, // latitude of longitude ticks ticklong; // longitude of latitude ticks colour c2nd, // default line colour c1st; // colour of lines of greater significance } spheretask; void setspheretaskradius(spheretask *ST, real F, bool Hour); void initspheretask(spheretask *ST, window *W, projection *P, bool Globe, real Margin, sphmapptr Map, bool Hour); void drawsphericalcoords(spheretask *ST); void drawequator(spheretask *ST); void drawdashedequator(spheretask *ST); void drawprimemeridian(spheretask *ST, bool Colure); void coordtick(spheretask *ST, real LAT, real LONG, image *D, char Dir, vector *U);