Next: , Previous: , Up: 2D samples   [Contents][Index]

3.6.16 Axial sample

Function axial draw surfaces of rotation for contour lines. You can draw wire surfaces (‘#’ style) or ones rotated in other directions (‘x’, ‘z’ styles). The sample code is:

int sample(mglGraph *gr)
  mglData a;  mgls_prepare2d(&a);
  gr->SubPlot(2,2,0); gr->Title("Axial plot (default)");
  gr->Light(true);  gr->Alpha(true);  gr->Rotate(50,60);
  gr->Box();  gr->Axial(a);

  gr->SubPlot(2,2,1); gr->Title("'x' style;'.' style"); gr->Rotate(50,60);
  gr->Box();  gr->Axial(a,"x.");

  gr->SubPlot(2,2,2); gr->Title("'z' style"); gr->Rotate(50,60);
  gr->Box();  gr->Axial(a,"z");

  gr->SubPlot(2,2,3); gr->Title("'\\#' style"); gr->Rotate(50,60);
  gr->Box();  gr->Axial(a,"#");
  return 0;

Example of Axial()