HOME
ABOUT GCS
INTERFACE
DESCRIPTION
EXAMPLES

List of Functions


0
 printf(char *fmt,...)
 Formatted print. Characters 'i', 'f' and 'e' may be used in combination with '%'.
1
 double sin(double x)
 sin of x
2
 double cos(double x)
 cos of x
3
 double tan(double x)
 tangent of x
4
 double asin(double x)
 sin-1(x) in range betweem -pi/2 and pi/2
5
 double acos(double x)
 cos-1(x) in range between 0 and pi
6
 double atan(double x)
 tan-1(x)
7
 double atan2(double y,double x)
 tan-1(y/x)
8
 double sinh(double x)
 hyperbolic sine of x
9
 double cosh(double x)
 hyperbolic cosine of x
10
 double tanh(double x)
 hyperbolic tangent of x
11
 double exp(double x)
 exponential function ex.
12
 double log(double x)
 natural logarithm ln(x).
13
 double log10(double x)
 base 10 logarithm log10(x).
14
 double pow(double x,double y)
 xy
15
 double sqrt(double x)
 square-root
16
 double ceil(double x)
 smallest integer not less than x, as a double
17
 double floor(double x)
 largest integer nor greater than x, as a double
18
 double fabs(double x)
 absolute value of x
19
 double fmod(double x,double y)
 floating-point remainder of x/y, with the same sign as x.
20
 void MakeView(int width,int height)
 Set an imaginary rectangle area where the drawing takes place. width and height are in pixels and the coordinate system is upperl-left-origin system.
21
 void SetColor(int r,int g,int b)
 red, green and blue values are specified between 0 and 100, inclusive.
22
 void MoveTo(int x,int y)
 Move pen to (x,y) with pen up.
23
 void LineTo(int x,int y)
 Move pen to (x,y) with pen down.
24
 void GifOut()
 returns the drawing in GIF format.
25
 void OpenPoly()
 used in combination with ClosePoly(). MoveTo and LineTo function calls in between define a polygon, inside of which is painted by the currently set color. The last point of the polygon will be set to the first point automatically if contour is not closed.
26
 void ClosePoly()
 End of the fill-polygon operation. An OpenPoly()-ClosePoly() pair with a polygon drawing operation in between yields a painted polygon.
27
 void FontInfo(int font,int direc,int mode)
 font is the font ID number that must be either 11, 16 or 22. They are bitmapped fonts with the sizes of 6x11, 8x16 and 12x22. direc and mode are not yet used and set them to 0.
28
 void DrawString(char *c)
 draw the given string from the current pen position
29
 void MakeGraph(int left,int top,int right,int bottom)
 make a graph with the size of given rectangle
30
 void HorizTime()
 horizontal axis is time
31
 void HorizScale(char *c,double left,double right)
 define and draw the horizontal scale. c is title string. left and right define range.
32
 void VertScale(char *c,double left,double right)
 define and draw the vertical scale. c is title string. left and right define range.
33
 void MoveToG(double x,double y)
 move to point inside graph giving its coordinate in physical values
34
 void LineToG(double x,double y)
 move to point inside graph with pen-down giving its coordinate in physical values
35
 void PlotG(int mark,double x,double y)
 plot a mark such as a dot in graph giving its coordinate in physical values
36
 double erf(double x)
 Error function
37
 double Jn(int n,double x)
 Bessel function of the first kind of order n
38
 double Yn(int n,double x)
 Bessel function of the second kind of order n
39
 double refday(double mdy,double hms)
 The reference day is a Julian day with some offset. mdy is month-day-year in mm.ddyyyy. hms is hour-mimute-second in hh.mmss. The returned value has a fraction that corresponds to the time in the day.
40
 double mdyday(double ref)
 Month-day-year in mm.ddyyyy for a given reference day.
41
 double hmsday(double ref)
 Hour-minute-second in hh.mmss for a given reference day
42
 void DrawNum(int num)
 Draw an integer number
43
 void DrawFNum(char *fmt,double x)
 Draw a formatted double number. fmt is a literal with % and f format.
44
 void exit(int i)
 terminate execution. int number will be printed and returned to client.
45
 void PngOut(void)
 Generate and return PNG file. Can be used interchangeably with GifOut().
46
 int matmul(double c[][],double a[][],double b[][])
 Matrix multiplication c=a*b
47
 int matinv(double a[][])
 Matrix inversion
GCS NOTES