CVLofVLCIL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 3.9, Creation date: 2017-06-09, Last change: 2025-09-14

returns a CPL/CVL from a PL or VL using a contour index list

Description

CIL= [startindex endindex; startindex endindex; ]


See Also: PLofCPL , CPLofPL , CILofCVL

Example Illustration

 missing image of CVLofVLCIL(VL,CIL)

Syntax

CVL=CVLofVLCIL(VL,CIL)

Input Parameter

VL: Point or Vertex list
CIL: [startindex endindex; startindex endindex; ]

Output Parameter

CVL: CLosed Polygon List or Closed Vertex List

Examples


VL=rand(6,3)
CVLofVLCIL(VL,[1 3;4 6])




Copyright 2017-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, CVLofVLCIL, is designed to generate a Closed Vertex List (CVL) from a given Vertex List (VL) and a Contour Index List (CIL). The function is part of the SolidGeometry library and was introduced in version 3.9.

Input Parameters

Output

Algorithm Steps

  1. Initialize the CVL matrix with NaN values. The size of CVL is determined by the number of vertices in VL plus the number of segments in CIL, and it has the same number of columns as VL.
  2. Initialize a counter variable, k, to zero. This variable keeps track of the current position in the CVL matrix.
  3. Iterate over each row in the CIL matrix:
  4. After the loop, trim the CVL matrix to remove any trailing NaN values by keeping only the rows up to k-1.
  5. If no output argument is specified (nargout==0), plot the CVL using the CVLplot function with a magenta color and a line width of 2.
Algorithm explaination created using ChatGPT on 2025-08-18 23:32. (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