Function surfca is similar to surf but its coloring and transparency is determined by another data arrays.
MGL code:
call 'prepare2d' title 'SurfCA plot':rotate 50 60:light on:alpha on:box:surfca a b a
C++ code:
void smgl_surfca(mglGraph *gr) { mglData a,b; mgls_prepare2d(&a,&b); if(big!=3) gr->Title("SurfCA plot"); gr->Rotate(50,60); gr->Alpha(true); gr->Light(true); gr->Box(); gr->SurfCA(a,b,a); }