SGconvexhullVL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 4.6, Creation date: 2019-05-08, Last change: 2025-09-14

creates the convex hull of a cloud of vertices

Description

just delaunay traingulation of the vertex list
SG.VL=VL; [SG.FL]=convexHull(delaunayTriangulation(SG.VL));
not the same as: SGconvexHull



See Also: SGconvexHull

Example Illustration

 missing image of SGconvexhullVL(VL)

Syntax

SG=SGconvexhullVL(VL)

Input Parameter

VL: Vertex List or SG

Output Parameter

SG: Solid Geometry

Examples


SGconvexhullVL(rand(1000,3))
SGconvexhullVL(SGarrow([0 0 0;100 100 100]))




Copyright 2019-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, SGconvexhullVL, is designed to create the convex hull of a cloud of vertices. It is part of the SolidGeometry library and was introduced in version 4.6. The function primarily uses Delaunay triangulation to achieve this.

Input Parameters

Output

Algorithm Steps

  1. The function begins by extracting function parameters using getfuncparams, with a default value of 0 if no additional parameters are provided.
  2. It checks if VL is numeric. If not, it assumes VL is an SG object and extracts the vertex list from it.
  3. The vertex list is assigned to SG.VL.
  4. The convex hull is computed using Delaunay triangulation, and the resulting face list is stored in SG.FL.
  5. If the parameter d is greater than 0, the function calls SGgrow to expand the geometry.
  6. If no output arguments are specified, the function visualizes the result using SGfigure and SGplot, setting the plot light and plotting the vertex list.

Example Usage

To create a convex hull from a random set of 1000 3D points:

SGconvexhullVL(rand(1000,3))

To create a convex hull from an SG object representing an arrow:

SGconvexhullVL(SGarrow([0 0 0;100 100 100]))
Algorithm explaination created using ChatGPT on 2025-08-18 23:47. (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