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

3.7.5 Cloud sample

Function cloud draw cloud-like object which is less transparent for higher data values. Similar plot can be created using many (about 10-20) Surf3A(a,a) isosurfaces. The sample code is:

int sample(mglGraph *gr)
  mglData c;  mgls_prepare3d(&c);
  gr->SubPlot(2,2,0); gr->Title("Cloud plot");
  gr->Rotate(50,60);  gr->Alpha(true);
  gr->Box();  gr->Cloud(c,"wyrRk");

  gr->SubPlot(2,2,1); gr->Title("'i' style");
  gr->Rotate(50,60);  gr->Box();  gr->Cloud(c,"iwyrRk");

  gr->SubPlot(2,2,2); gr->Title("'.' style");
  gr->Rotate(50,60);  gr->Box();  gr->Cloud(c,".wyrRk");

  gr->SubPlot(2,2,3); gr->Title("meshnum 10");
  gr->Rotate(50,60);  gr->Box();  gr->Cloud(c,"wyrRk","meshnum 10");
  return 0;

Example of Cloud()