manpagez: man pages & more
info mathgl
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Plotter classes

The class mglGraph (see section MathGL core) provide the basic tools for creating scientific graphics but it is abstract class. The matter is that there are several possible way to draw a graphics: in bitmap, in vector file, using OpenGL and so on. As result, user should use some of derived classes to do actual drawing. In principle, it is possible to derive a class exactly from mglGraph (and it was in v.1.6). But I recommend to derive from mglGraphAB class for higher compatibility of produced graphics from different classes. Class mglGraphAB is another abstract class which provide basic coordinates transformation, plotting functions and export to bitmap picture. It still require a functions for drawing lines, triangles and quadrangles. So below a set of “plotter” classes with short comments.

Class: mglGraphAB

Abstract class mglGraphAB implements plotting function for 1D, 2D and 3D plots using Z-ordering and provides base functionality for to screen coordinate transformation, bitmap creation and so on. Class is defined in #include <mgl/mgl_ab.h>.

Class: mglGraphZB

Class mglGraphZB implements plotting function for 1D, 2D and 3D plots using Z-Buffer. It is useful for off-screen (for console or SSH terminal) programs. Also this class can be used in any other programs which may draw bitmap on the screen (for example, by using FLTK, Qt, wxWidgets libraries and so on). Note that bitmap picture is saved while exporting to EPS format. The produced graphics have better quality but slower in comparison with graphics in the class mglGraphPS. Class is defined in #include <mgl/mgl_zb.h>.

Class: mglGraphPS

Class mglGraphPS implements plotting functions for 1D, 2D and 3D plots and exports them to PostScript or SVG file. It is useful for off-screen (for console or SSH terminal) programs. Note that there is no transparency support now and color interpolation and lightning support is limited (not so nice as in class mglGraphZB). As result the plots with transparency (SurfA, Surf3A, CloudP, CloudQ) may look not so good. However the speed of drawing is higher in comparison with one in the class mglGraphZB. Class is defined in #include <mgl/mgl_eps.h>.

Class: mglGraphGL

Class mglGraphGL implements plotting function for 1D, 2D and 3D plots under OpenGL. This class can not be used in off-screen applications. Note, that several transparent overlapped surfaces are drawn not so correctly due to OpenGL limitations. Class is defined in #include <mgl/mgl_gl.h>.

Class: mglGraphIDTF

Class mglGraphIDTF implements plotting function for 1D, 2D and 3D plots and export it in IDTF format. Later this file can be converted in U3D format. Class is defined in #include <mgl/mgl_idtf.h>.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2017
Individual documents may contain additional copyright information.