by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 5.2, Creation date: 2022-04-01, Last change: 2025-09-15
h=CVLplotsurface(CVL,[c,a,e,planar])
CVL: | CVL | |
c: | color | |
a: | transparenct | |
e: | edge color | |
planar: | true for planar CVL's; default is true |
h: | handle to graphics |
CVLplotsurface(CVLsample(32))
SGfigure(-30,30); CVLplotsurface(CVLsample(17),'','','',true); % error for 3D contour
SGfigure(-30,30); CVLplotsurface(CVLsample(17),'','','',false); % correct for 3D contour
This function, CVLplotsurface, is designed to plot a surface from a Closed Polygon List (CVL) using either 2D or 3D Delaunay triangulation, depending on whether the CVL is planar or not.
getfuncparams.getfuncparams.true.c, a, e, and planar using the getfuncparams function. This function assigns default values if the parameters are not provided.planar parameter.planar is true, perform 2D Delaunay triangulation on the CVL using the function VLFLofCVLdelaunay2D. This function returns vertex list SF.VL and face list SF.FL.planar is false, perform 3D Delaunay triangulation on the CVL using the function VLFLofCVLdelaunay3D. This function also returns vertex list SF.VL and face list SF.FL.SGplotalpha, passing the triangulated data SF, color c, transparency a, and edge color e.h to the created plot.