Syntax
[CVL,SCV]=incenterVLFL(VL,FL)
Input Parameter
VL : | | Vertex list [nx2] or [nx3] |
FL : | | Facet list |
Output Parameter
CVL : | | Center Vertex List |
SCV : | | Surface Center Vertex |
Copyright 2015-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 calculates the center of a surface and all its facets using vertex and facet lists.
Input Parameters
- VL: Vertex list, which can be either [nx2] or [nx3] dimensions.
- FL: Facet list, which defines the connections between vertices to form facets.
- varargin: Optional parameters, used to determine if weighting is applied.
Output Results
- CVL: Center Vertex List, which contains the center of each facet.
- SCV: Surface Center Vertex, which is the overall center of the surface.
Algorithm Steps
- Determine if weighting is applied using
getfuncparams
with varargin
.
- If weighting is applied, calculate the area of each facet using
VLFLarea
and transpose the result. If not, set all areas to 1.
- For each facet, calculate the center by averaging the vertices that form the facet. Store these in
CVL
.
- Calculate the inverse of the area for each facet and store it in
A
.
- Multiply each center vertex by its corresponding area inverse to get
NVL
.
- Calculate the overall surface center vertex
SCV
by averaging NVL
.
- If no output is requested, visualize the results using
SGfigure
, VLFLfigure
, and VLplot
.
Algorithm explaination created using ChatGPT on 2025-08-18 23:48. (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