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

3.7.11 ContF projection sample

Functions contfz, contfy, contfx draw filled contours on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field. The sample code is:

int sample(mglGraph *gr)
  mglData c;  mgls_prepare3d(&c);
  gr->Title("Cont[XYZ] sample");  gr->Rotate(50,60);
  gr->Box();  gr->ContFX(c.Sum("x"),"",-1);
  gr->ContFY(c.Sum("y"),"",1);  gr->ContFZ(c.Sum("z"),"",-1);
  return 0;

Example of ContFX() ContFY() ContFZ()