home *** CD-ROM | disk | FTP | other *** search
- /**** function.h ****/
- /* Program to create a 3d graph of a function using Euclid */
- /* By Paul Field
- * See !ReadMe file for distribution/modification restrictions
- */
-
- #ifndef __function_h
- #define __function_h
-
- #include "euclid.h"
-
- typedef struct graphdata
- { double minx,maxx; /* Range of x to plot graph */
- double miny,maxy; /* Range of y to plot graph */
- unsigned int subdivisions; /* Squares along edge of graph */
- unsigned int realsize; /* Graph is scaled so that it fits in a cube of */
- /* 'realsize' (euclid coordinates) length sides */
- double (*f)(double, double); /* The function that makes up the graph */
- const char *name; /* The name of the graph */
- double scale; /* This field is filled in by 'makegraph', it is */
- /* the value that x,y and z values were multiplied */
- /* by to make them fit in the 'realsize' cube */
- }graphdata;
-
-
- os_error *function_makegraph(euclid_header *h, graphdata *g, euclid_mesh **mesh);
- /* Takes the current euclid data structure 'h' and the details of the graph 'g'
- * and sets *mesh to point to a mesh that represents the graph.
- * If there is an error it is returned and '*mesh' is undefined.
- */
- #endif
-