Next: Axial sample, Previous: ContD sample, Up: 2D samples [Contents][Index]
Function contv draw vertical cylinders (belts) at contour lines. The sample code is:
int sample(mglGraph *gr) { mglData a,v(5); mgls_prepare2d(&a); v.a[0]=-0.5; v.a[1]=-0.15; v.a[2]=0; v.a[3]=0.15; v.a[4]=0.5; gr->SubPlot(2,2,0); gr->Title("ContV plot (default)"); gr->Rotate(50,60); gr->Box(); gr->ContV(a); gr->SubPlot(2,2,1); gr->Title("manual levels"); gr->Rotate(50,60); gr->Box(); gr->ContV(v,a); gr->SubPlot(2,2,2); gr->Title("'\\_' style"); gr->Rotate(50,60); gr->Box(); gr->ContV(a,"_"); gr->SubPlot(2,2,3); gr->Title("ContV and ContF"); gr->Rotate(50,60); gr->Box(); gr->Light(true); gr->ContV(a); gr->ContF(a); gr->Cont(a,"k"); return 0; }