11.20 Sample ‘cloud

Function cloud draw cloud-like object which is less transparent for higher data values. Similar plot can be created using many (about 10...20 – surf3a a a;value 10) isosurfaces surf3a.

MGL code:

call 'prepare3d'
subplot 2 2 0:title 'Cloud plot':rotate 50 60:alpha on:box:cloud c 'wyrRk'
subplot 2 2 1:title '"i" style':rotate 50 60:box:cloud c 'iwyrRk'
subplot 2 2 2:title '"." style':rotate 50 60:box:cloud c '.wyrRk'
subplot 2 2 3:title 'meshnum 10':rotate 50 60:box:cloud c 'wyrRk'; meshnum 10

C++ code:

void smgl_cloud(mglGraph *gr)
{
	mglData c;	mgls_prepare3d(&c);
	if(big!=3)	{	gr->SubPlot(2,2,0);	gr->Title("Cloud plot");	}
	gr->Rotate(50,60);	gr->Alpha(true);
	gr->Box();	gr->Cloud(c,"wyrRk");
	if(big==3)	return;
	gr->SubPlot(2,2,1);	gr->Title("'i' style");
	gr->Rotate(50,60);	gr->Box();	gr->Cloud(c,"iwyrRk");
	gr->SubPlot(2,2,2);	gr->Title("'.' style");
	gr->Rotate(50,60);	gr->Box();	gr->Cloud(c,".wyrRk");
	gr->SubPlot(2,2,3);	gr->Title("meshnum 10");
	gr->Rotate(50,60);	gr->Box();	gr->Cloud(c,"wyrRk","meshnum 10");
}

Sample cloud