incenterVLFL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Geometric Queries
Introduced first in SolidGeometry 2.4, Creation date: 2015-08-21, Last change: 2025-09-14

returns the center of a surface and of all facets

Example Illustration

 missing image of incenterVLFL(VL,FL)

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

Output Results

Algorithm Steps

  1. Determine if weighting is applied using getfuncparams with varargin.
  2. If weighting is applied, calculate the area of each facet using VLFLarea and transpose the result. If not, set all areas to 1.
  3. For each facet, calculate the center by averaging the vertices that form the facet. Store these in CVL.
  4. Calculate the inverse of the area for each facet and store it in A.
  5. Multiply each center vertex by its corresponding area inverse to get NVL.
  6. Calculate the overall surface center vertex SCV by averaging NVL.
  7. 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