VLFLerrordoubledvertex

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 4.0, Creation date: 2017-07-12, Last change: 2025-09-14

creates an doubled vertex error by adding an existing vertex of a random facet

Description

Testing function for development that creates copies of vertices plus a noise.

See Also: VLFLcorrectdoubledvertex , VLFLerroropenfaces

Example Illustration

 missing image of VLFLerrordoubledvertex(VL,FL)

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

Output Results

Algorithm Steps

  1. Define a small noise value: noise = 1e-14;
  2. Determine the number of elements in the facet list: fim = numel(FL);
  3. Select a random facet index: fi = 1 + floor(fim * rand);
  4. 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];
  5. 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