11.127 Sample ‘surfc

Function surfc is similar to surf but its coloring is determined by another data.

MGL code:

call 'prepare2d'
title 'SurfC plot':rotate 50 60:light on:box:surfc a b

C++ code:

void smgl_surfc(mglGraph *gr)
{
	mglData a,b;	mgls_prepare2d(&a,&b);
	if(big!=3)	gr->Title("SurfC plot");
	gr->Rotate(50,60);	gr->Light(true);	gr->Box();	gr->SurfC(a,b);
}
Sample surfc