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


3.6.4 SurfCA sample

Function surfca is similar to surf but its color and transparency is determined by another data. The sample code is:

int sample(mglGraph *gr)
{
  mglData a,b;  mgls_prepare2d(&a,&b);
  gr->Title("SurfCA plot");  gr->Rotate(50,60);
  gr->Alpha(true);  gr->Light(true);
  gr->Box();  gr->SurfCA(a,b,a);
  return 0;
}
Example of SurfCA()