// three.h // Contour plots typedef void *(*startcontourpp)(real V); typedef void *(*neighbourcpp)(void *L, void *R); typedef void (*posncontourpp)(void *N, vector *V); typedef bool (*donecontourpp)(void *L, void *R); typedef void *(*nextcontourpp)(void *N); typedef struct { window *wind; // the window being drawn to projection *proj; // perspective in which the contours are to be drawn startcontourpp start; // call-back for entry node to left of contour neighbourcpp neigh; // call-back for common neighbour to two given nodes posncontourpp where; // call-back for real (x,y,value) coordinates of node donecontourpp done; // call-back for whether contour has reached the far boundary void *outline; // starting node for outline nextcontourpp loop; // call-back for next node c.c.w. along boundary colour rgb; // the colour bool ticks; // whether tick marks are to be drawn real level, // value of current contour tickfrac; // how far along a contour the tick mark is drawn int max; // maximum number of steps to take on each contour // private bool pen; // whether or not the pen is down } contourtask; void drawcontour(contourtask *CT, real Level); void framecontourplot(contourtask *CT); // N-by-N matrices void solvetridiag(int N, real *A, real *B, real *C, real *D); // C-splines //void drawcspline(int OFFSET, real *H, real *V, real *HT, real *VT, int SEGS); // Platonic solids void framedodecahedron(window *W, vector *Offset); void framebccwignerseitzcell(window *W, vector *Offset); void framefccwignerseitzcell(window *W, vector *Offset);