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

3.3 Transformation matrix

These functions control how and where further plotting will be placed. There is a curtain order of calling of these functions for the better plot view. First one should be SubPlot() or InPlot() for specifying the place. After it a Rotate() and Aspect(). And finally any other plotting functions may be called.

Method on mglGraph: void SubPlot (int nx, int ny, int m, float dx=0, float dy=0)

Puts further plotting in a m-th cell of nx*ny grid of the whole frame area. This function set off any aspects or rotations. So it should be used first for creating the subplot. From the aesthetical point of view it is not recommended to use this function with different matrices in the same frame. The position of the cell can be shifted from its default position by relative size dx, dy.

Method on mglGraph: void InPlot (float x1, float x2, float y1, float y2)

Puts further plotting in some region of the whole frame surface. This function allows one to create a plot in arbitrary place of the screen. The position is defined by rectangular coordinates [x1, x2]*[y1, y2]. The coordinates x1, x2, y1, y2 are normalized to interval [0, 1]. This function set off any aspects or rotations. So it should be used first for creating subplot.

Method on mglGraph: void Rotate (float TetX, float TetZ, float TetY=0)

Rotates a further plotting relative to each axis (x, z, y) consecutively on angles TetX, TetZ, TetY.

Method on mglGraph: void RotateN (float Tet, float x, float y, float z)

Rotates a further plotting around vector {x,y,z}.

Method on mglGraph: void Aspect (float Ax, float Ay, float Az)

Defines aspect ratio for the plot. The viewable axes will be related one to another as the ratio Ax:Ay:Az. For the best effect it should be used after Rotate() function.

Method on mglGraph: void Perspective (float a)

Add (switch on) the perspective to plot. The parameter a ~ 1/z_{eff} \in [0,1). By default (a=0) the perspective is off.

Method on mglGraph: void Identity ()

Clears transformation matrix. This function clears all previous effects of Aspect(), SubPlot(), InPlot() or Rotate() functions. It is equivalent to the call of InPlot(0,1,0,1).

Method on mglGraph: void RestoreM ()

Restore transformation matrix after last InPlot(). This function clears all previous effects of Aspect(), SubPlot(), InPlot() or Rotate() functions. It is useful to restore back the transformation matrix after Identity() call.

Method on mglGraph: void View (float tetx, float tetz, float tety= 0)

Sets angle of view independently from Rotate() but usually don't rotate actually.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2026
Individual documents may contain additional copyright information.