| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
8.4.2 Transformation (curved coordinates, Pure C)
- C function:
voidmgl_set_func (HMGLgr,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 beNULL. Using transformation formulas will slightly slowing the program, i.e.mgl_set_func(NULL, NULL, NULL)is faster thanmgl_set_func("x", "y", "z"). See section mglFormula class.
- C function:
voidmgl_set_ternary (HMGLgr,inttern) 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.
