Syntax
[VL,FL]=VLFLerrordoubledvertex(VL,FL)
Input Parameter
VL : | | Vertex List |
FL : | | Facet List |
Output Parameter
VL : | | vertex list with an additional/doubled entry |
FL : | | facet list indexing the doubled entry |
Examples
A=SGbox([30,20,10])
[B.VL,B.FL]=VLFLerrordoubledvertex(A.VL,A.FL)
[C.VL,C.FL]=VLFLcorrectdoubledvertex(B.VL,B.FL)
Copyright 2017-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 introduces an error by duplicating a vertex in a given vertex list (VL) and facet list (FL). It is a testing function for development purposes, specifically designed to create copies of vertices with a small noise added.
Input Parameters
- VL: Vertex List - A matrix where each row represents the coordinates of a vertex.
- FL: Facet List - A vector where each element is an index pointing to a vertex in the vertex list.
Output Results
- VL: Updated vertex list with an additional/doubled entry.
- FL: Updated facet list indexing the doubled entry.
Algorithm Steps
- Define a small noise value:
noise = 1e-14;
- Determine the number of elements in the facet list:
fim = numel(FL);
- Select a random facet index:
fi = 1 + floor(fim * rand);
- Duplicate the vertex corresponding to the selected facet index, adding a small random noise to each coordinate:
VL = [VL; VL(FL(fi), :) + rand(1, 3) * noise];
- Update the facet list to point to the new vertex:
FL(fi) = size(VL, 1);
This function is part of the SolidGeometry library and is used for testing purposes to simulate errors in vertex data by introducing duplicates with slight variations.
Algorithm explaination created using ChatGPT on 2025-08-18 23:44. (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