// : xwin -
dislin.metafl ( "xwin" );
// DISLIN
dislin.disini ();
//
dislin.titlin ( "3-D Colour Plot of the Function" , 1);
dislin.titlin ( "f(x,y) = sin(x) * cos(y)" , 3);
//
dislin.name ( "X-axis" , "X" );
dislin.name ( "Y-axis" , "Y" );
dislin.name ( "Z-axis" , "Z" );
//
dislin.title ();
//
dislin.ax3len(1000, 1000, 1000);
//
dislin.graf3(0.0f, 360.0f, 0.0f, 90.0f, 0.0f, 360.0f, 0.0f, 90.0f, -2.0f, 2.0f, -2.0f, 1.0f);
// . func
dislin.crvmat(func, n, n, 1, 1);
// DISLIN
dislin.disfin ();
* This source code was highlighted with Source Code Highlighter .
But what happened:
dislin.titlin( "CURVE" , 1);
dislin.titlin( "SIN^2(X), SIN(X) + COS(X)" , 3);
dislin.graf(0.0f, 360.0f, 0.0f, 90.0f, -2.0f, 2.0f, -1.0f, 0.5f);
dislin.title();
// 2
dislin.color( "red" );
dislin.curve(xPoints, func1, n);
dislin.color( "green" );
dislin.curve(xPoints, func2, n);
* This source code was highlighted with Source Code Highlighter .
dislin.polar(1.0f, 0.0f, 0.2f, 0.0f, 30.0f);
dislin.curve(xPoint, func, n);
* This source code was highlighted with Source Code Highlighter .
dislin.view3d (-5.0f, -5.0f, 4.0f, "ABS" );
dislin.graf3d (0.0f, 360.0f, 0.0f, 90.0f, 0.0f, 360.0f, 0.0f, 90.0f,
-3.0f, 3.0f, -3.0f, 1.0f);
dislin.color ( "red" );
//
dislin.surmat (func, n, m, 1, 1);
* This source code was highlighted with Source Code Highlighter .
dislin.metafl ( "png" );
A dislin.png file with a picture will appear in the program folder.
By the way, the library DISLIN is 25 years old. The first version was released in December 1986.
Source: https://habr.com/ru/post/125611/