[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
2.1 Basic usage
MathGL library can be used by several manners. Each has positive and negative sides:
-
The using of MathGL library features for creating graphical window (requires FLTK or GLUT libraries).
Positive side is the possibility to view the plot at once and to modify it (rotate, zoom or switch on transparency or lighting) by hand or by mouse. Negative sides are: the need of X-terminal and limitation consisting in working with the only one set of data at a time.
-
Direct writing to file in bitmap or vector format without creation of graphical window.
Positive aspects are: batch processing of similar data set (for example, a set of resulting data files for different calculation parameters), running from the console program (including the cluster calculation), fast and automated drawing, saving pictures for further analysis (or demonstration). Negative sides are: the usage of the external program for picture viewing. Also, the data plotting is non-visual. So, you have to imagine the picture (view angles, lighting and so on) before the plotting. I recommend to use graphical window for determining the optimal parameters of plotting on the base of some typical data set. And later use these parameters for batch processing in console program.
-
Drawing in memory with the following displaying by other graphical program.
In this case the programmer has more freedom in selecting the window libraries (not only FLTK or GLUT), in positioning and surroundings control and so on. I recommend to use such way for “settled” programs.
Let me consider the aforesaid in more detail.
2.1.1 Using FLTK/Qt/GLUT window | ||
2.1.2 Drawing to file | ||
2.1.3 Drawing in memory | ||
2.1.4 Using QMathGL |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |