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

8.4.2 Transformation (curved coordinates, Pure C)

C function: void mgl_set_func (HMGL gr, const char *EqX, const char *EqY, const char *EqZ)

Sets the transformation formulas for curvilinear coordinate. Each string should contain mathematical expression for new (real) coordinate depending on old (input) coordinates x, y, z. For example, the cylindrical coordinates are introduced as mgl_set_func("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. mgl_set_func(NULL, NULL, NULL) is faster than mgl_set_func("x", "y", "z"). See section mglFormula class.

C function: void mgl_set_ternary (HMGL gr, int 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.


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