Syntax
FL=FLofn(n)
Input Parameter
Output Parameter
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
- n: This is the number of points in the convex polygon. It is an integer value that determines the size of the output facet list.
Output
- FL: This is the facet list generated by the function. It is a matrix where each row represents a facet of the polygon. The facets are defined by indices of the points in the polygon.
Algorithm Explanation
The function FLofn
generates a facet list for a convex polygon with n
points. The algorithm works as follows:
- 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.
- 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.
- 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.
- 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