[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
2.7.8 CutMin and CutMax features
MathGL library has a feature for cutting of points in some region CutMin*CutMax. Such an excision can be used to improve the look of the graphics. Moreover, this cutting may help to show an internal structure of an object (like isocaps
plot in Matlab). For example, let us use the standard 3D data array and show its interior (see section CutMinMax sample).
mglData c(61,51,40); // create the data mglData v(10); v.Fill(-0.5,1); c.Modify("(-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1))"); gr->CutMin = mglPoint(0,-1,-1); gr->CutMax = mglPoint(1,0,1.1); gr->Surf3(-0.5,c,"BbcyrR"); gr->ContF3(v,c,'x',-1,"BbcyrR"); gr->ContF3(v,c,'y',-1,"BbcyrR"); gr->ContF3(v,c,'z',0,"BbcyrR"); gr->ContF3(v,c,'z',39,"BbcyrR");
One can also exclude points from arbitrary area in space. This area defined by textual formula CutOff()
(see section Cutting). The algorithm is the same as shown for “rectangular cutting”.