CVLplotsurface

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

plots a planar CVL as surface



See Also: CVLplot , CVLplots

Example Illustration

 missing image of CVLplotsurface(CVL,c,a,e,planar)

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

h: handle to graphics

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

Output

Algorithm Steps

  1. Retrieve the optional parameters c, a, e, and planar using the getfuncparams function. This function assigns default values if the parameters are not provided.
  2. Check if the CVL is planar using the planar parameter.
  3. 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.
  4. 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.
  5. Plot the triangulated surface using the function SGplotalpha, passing the triangulated data SF, color c, transparency a, and edge color e.
  6. 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