Syntax
[VL,FL]=VLFLofSurf(s)
Input Parameter
Output Parameter
VL : | | Vertex list |
FL : | | Facet list |
Copyright 2018-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, VLFLofSurf
, is designed to convert a surface handle into a vertex and facet list. It is part of the SG-Library and was introduced in SolidGeometry 4.3.
Input Parameters
- s: A surface handle, which is an object in MATLAB representing a surface plot.
Output Results
- VL: Vertex list, which contains the coordinates of the vertices of the surface.
- FL: Facet list, which contains the indices of the vertices that form each facet of the surface.
Algorithm Steps
- Initialize empty lists for vertices (
VL
) and facets (FL
).
- Iterate over each element in the surface handle array
s
using a for-loop.
- For each surface handle
s(i)
, use the surf2patch
function to convert the surface into a patch representation with triangles. This function returns:
f
: Facet data
v
: Vertex data
c
: Color data (not used further in this function)
- Call the function
VLFLcat2
to concatenate the new vertices and facets with the existing lists VL
and FL
.
- Check if the number of output arguments is zero (
nargout==0
), which implies that the function is called without expecting any output. If true:
- Call
SGfigure
to create a new figure window.
- Set the view angle of the plot to (-30, 30) using the
view
function.
- Plot the vertex and facet lists using the
VLFLplot
function.
This function is useful for converting surface plots into a format that can be easily manipulated or visualized in different ways.
Algorithm explaination created using ChatGPT on 2025-08-18 22:45. (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