11.41 Sample ‘dcont

Function dcont draw lines of intersections of two isosurfaces.

MGL code:

call 'prepare3d'
title 'DCont plot':rotate 50 60:light on:alpha on:box:surf3 c 0 'r':surf3 d 0 'b'
dcont 0 c d '2k'

C++ code:

void smgl_dcont(mglGraph *gr)
{
	mglData c,d,v;	mgls_prepare3d(&c,&d);
	if(big!=3)	gr->Title("DCont plot");
	gr->Rotate(50,60);	gr->Light(true);	gr->Alpha(true);
	gr->Box();	gr->Surf3(0,c,"r");	gr->Surf3(0,d,"b");
	gr->DCont(v,c,d,"2k");
}
Sample dcont