Syntax
h=CVLplotsurface(CVL,[c,a,e,planar])
Input Parameter
CVL : | | CVL |
c : | | color |
a : | | transparenct |
e : | | edge color |
planar : | | true for planar CVL's; default is true |
Output Parameter
Examples
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
Copyright 2022-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
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.
Input Parameters
- CVL: The Closed Polygon List to be plotted.
- c: Color of the surface. Default is determined by the function
getfuncparams
.
- a: Transparency of the surface. Default is 1 (opaque).
- e: Edge color of the surface. Default is determined by the function
getfuncparams
.
- planar: Boolean indicating if the CVL is planar. Default is
true
.
Output
- h: Handle to the graphics object created by the plot.
Algorithm Steps
- Retrieve the optional parameters
c
, a
, e
, and planar
using the getfuncparams
function. This function assigns default values if the parameters are not provided.
- Check if the CVL is planar using the
planar
parameter.
- If
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
.
- If
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
.
- Plot the triangulated surface using the function
SGplotalpha
, passing the triangulated data SF
, color c
, transparency a
, and edge color e
.
- Return the handle
h
to the created plot.
Algorithm explaination created using ChatGPT on 2025-08-19 00:08. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21