VLFLcircFLedges

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Surfaces
Introduced first in SolidGeometry 4.9, Creation date: 2020-02-15, Last change: 2025-09-14

modifies the Facet list by circulating rows to minimize the distance P2-P3.

Description

Time consuming function:
An FL consists of the sequence of three vertex indices [P1 P2 P3]. In principle, each row of the FL can rotate its entries without any change happening: [1 2 3] = [2 3 1] = [ 3 1 2].
In many calculations, however, the cross product at point P1 is always calculated using the equation
cross(P2-P1,P3-P1). This calculation is the more accurate the longer the two legs P2P1 and P3P1 are. For very acute-angled triangles, it can be useful to circulate rows of the facet list so that the distance P3-P2 is shorter than the other two, i.e. the apex angle is in P1. This would also allow the accuracy limit of the triangle to be reliably determined by the angle in P1:
For small angles the following applies: a = tan(a) but it is necessary to use cos instead of tan, since tan is the upper border of cos


See Also: VLDLBBofVLFL

Example Illustration

 missing image of VLFLcircFLedges(VL,FL)

Syntax

[FL,cosa]=VLFLcircFLedges(VL,FL)

Input Parameter

VL: Vertex list
FL: Facet list

Output Parameter

FL: Facet list with circulated rows to minimize distance |P2P3|
cosa: resulting cos alpha of angle at P1

Examples


[A,B]=CSGsample(13); SGfigure(B)
SGsample(27); B=ans;
VLFLcircFLedges(B.VL,B.FL);
B.FL=VLFLcircFLedges(B.VL,B.FL);




Copyright 2020-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

Last html export of this page out of FM database by TL: 2025-09-21