[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
2.7.1 Surf3 sample
Function surf3 is one of most suitable (for my opinion) functions to visualize 3D data. It draw the isosurface(s) – surface(s) of constant amplitude (3D analogue of contour lines). You can draw wired isosurfaces if specify ‘#’ style. The sample code is:
int sample(mglGraph *gr) { mglData c; mgls_prepare3d(&c); gr->Light(true); gr->Alpha(true); gr->SubPlot(2,2,0); gr->Title("Surf3 plot (default)"); gr->Rotate(50,60); gr->Box(); gr->Surf3(c); gr->SubPlot(2,2,1); gr->Title("'\\#' style"); gr->Rotate(50,60); gr->Box(); gr->Surf3(c,"#"); gr->SubPlot(2,2,2); gr->Title("'.' style"); gr->Rotate(50,60); gr->Box(); gr->Surf3(c,"."); return 0; }
This document was generated on March 21, 2014 using texi2html 5.0.