Mathgl 2.0.beta The version has many changes, including new structures, interfaces, new floor plans, and so on.
Mathgl is a http://www.aliyun.com/zixun/aggregation/32995.html "> Class library that generates High-quality graphics under Windows and Linux; used to generate various graphs from a large array of arrays. ; can be easily embedded in other programs;
Download Address: Http://sourceforge.net/projects/mathgl/files/mathgl/mathgl%202.beta/mathgl-2x.tgz/download
Use examples:
C + + code
Mgldata A (50,40);
A.modify ("0.6*sin (2*pi*x) *sin (3*pi*y) + 0.4*cos (3*pi* (x*y))");
Gr->rotate (40,60);
Gr->box (); Gr->light (TRUE); Gr->fog (1,0.1);
Gr->surf (a); Gr->c++ont (A, "Y");
MGL Code
New A 50 40
Modify a ' 0.6*sin (2*pi*x) *sin (3*pi*y) + 0.4*cos (3*pi* (x*y))
Rotate 40 60
Box:fog 1 0.1:light on
Surf A:cont a ' y '
Pure C Code
Hmdt a = Mgl_create_data_size (50,40,1);
Mgl_data_modify (A, "0.6*sin (2*pi*x) *sin (3*pi*y) + 0.4*cos (3*pi* (X*y))", 0;
Mgl_rotate (gr,40.,60.,0);
Mgl_box (gr,1);
Mgl_fog (gr,1.,0.1)
Mgl_light (gr,1)
Mgl_surf (gr,a,0);
Mgl_cont (gr,a, "Y", 7,nan);
Mgl_delete_data (a);
Fortran Code
Integer A, mgl_create_data_size
Real Zero, Nan
! I don ' t know the NaN symbol in Fortran. So I produce it as Zero/zero
Zero = 0; Nan = Zero/zero
A = Mgl_create_data_size (50,40,1);
Call Mgl_data_modify (A, "0.6*sin (2*pi*x) *sin (3*pi*y) + 0.4*cos (3*pi* (X*y))", 0;
Call Mgl_rotate (gr,40.,60.,0.)
Call Mgl_box (gr,1)
Call Mgl_fog (gr,1.,0.1)
Call Mgl_light (gr,1)
Call Mgl_surf (Gr,a, "")
Call Mgl_cont (gr,a, ' y ', 7,nan)
Call Mgl_delete_data (a)
Python
A = Mgldata (50,40);
A.modify ("0.6*sin (2*pi*x) *sin (3*pi*y) +0.4*cos (3*pi*)");
Gr. Rotate (40,60);
Gr. Box (); Gr. Light (1); Gr. Fog (1,0.1);
Gr. Surf (a); Gr. Cont (A, "Y");