11.7 Sample ‘axial

Function axial draw surfaces of rotation for contour lines. You can draw wire surfaces (‘#’ style) or ones rotated in other directions (‘x’, ‘z’ styles).

MGL code:

call 'prepare2d'
subplot 2 2 0:title 'Axial plot (default)':light on:alpha on:rotate 50 60:box:axial a
subplot 2 2 1:title '"x" style;"." style':light on:rotate 50 60:box:axial a 'x.'
subplot 2 2 2:title '"z" style':light on:rotate 50 60:box:axial a 'z'
subplot 2 2 3:title '"\#" style':light on:rotate 50 60:box:axial a '#'

C++ code:

void smgl_axial(mglGraph *gr)
{
	mglData a;	mgls_prepare2d(&a);
	if(big!=3)	{	gr->SubPlot(2,2,0);	gr->Title("Axial plot (default)");	}
	gr->Light(true);	gr->Alpha(true);	gr->Rotate(50,60);	gr->Box();	gr->Axial(a);
	if(big==3)	return;
	gr->SubPlot(2,2,1);	gr->Title("'x' style; '.'style");	gr->Rotate(50,60);	gr->Box();	gr->Axial(a,"x.");
	gr->SubPlot(2,2,2);	gr->Title("'z' style");	gr->Rotate(50,60);	gr->Box();	gr->Axial(a,"z");
	gr->SubPlot(2,2,3);	gr->Title("'\\#' style");	gr->Rotate(50,60);	gr->Box();	gr->Axial(a,"#");
}

Sample axial