MATHGL 2.0.beta Release High quality Graphics class library

Source: Internet
Author: User
Keywords Mathgl
Tags address aliyun array arrays based class code download

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");

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.