FLofn

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - FL/Facet Lists
Introduced first in SolidGeometry 1.0, Creation date: 2013-01-08, Last change: 2025-09-14

DO NOT USE (MACRO=>SINGLE LINE) Identical to FLofVL (VL) TESSELATION

Description

More a macro than a function, so better write directly:
FL=[ones(1,n-2); 2:n-1; 3:n]'; % tessellation of convex polygon

Example Illustration

 missing image of FLofn(n)

Syntax

FL=FLofn(n)

Input Parameter

n: number of points

Output Parameter

FL: Facet list




Copyright 2013-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 algorithm is a simple macro designed to generate a facet list for tessellating a convex polygon. It is implemented in MATLAB and is part of the SG-Library. The function is named FLofn and takes a single input parameter.

Input Parameter

Output

Algorithm Explanation

The function FLofn generates a facet list for a convex polygon with n points. The algorithm works as follows:

  1. It creates a row vector of ones with a length of n-2. This vector represents the first vertex of each facet, which is always the first point in the polygon.
  2. It creates a row vector from 2 to n-1. This vector represents the second vertex of each facet, iterating through the points in the polygon.
  3. It creates a row vector from 3 to n. This vector represents the third vertex of each facet, iterating through the points in the polygon.
  4. These three row vectors are combined into a matrix, where each row represents a facet of the polygon. The matrix is then transposed to match the expected output format.

The result is a tessellation of the convex polygon into triangular facets, with each facet defined by three consecutive points.

Algorithm explaination created using ChatGPT on 2025-08-18 21:55. (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