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

3.2.2 Transformation (curved coordinates)

Method on mglGraph: void Axis (const char *EqX, const char *EqY, const char *EqZ)

Safely sets the transformation formulas for curvilinear coordinate. Each string should contain mathematical expression for real coordinate depending on internal coordinates x, y, z. For example, the cylindrical coordinates are introduced as Axis("x*cos(y)", "x*sin(y)", "z");. For removing of formulas the corresponding parameter should be NULL. Using transformation formulas will slightly slowing the program, i.e. Axis(NULL, NULL, NULL) is faster than Axis("x", "y", "z"). See section mglFormula class.

Method on mglGraph: void Ternary (bool tern)

The function sets to draws Ternary plot. This special plot is for 3 dependent coordinates (components) a, b, c so that a+b+c=1. MathGL uses only 2 independent coordinates a=x and b=y since it is enough to plot everything. At this third coordinate z act as another parameter to produce contour lines, surfaces and so on. See section Ternary plot sample, for sample code and picture.

General option of mglGraph: mglFormula *fx, *fy, *fz

Transformation formula for x, y and z directions. These variables are obsolete – use Axis() function instead.


© manpagez.com 2000-2026
Individual documents may contain additional copyright information.