VLvaryfrom
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 5.2, Creation date: 2022-04-26, Last change: 2025-09-15
simply adds small values in a determinstic way to a vertex list
Description
The set of fnctns
VLvaryfrom, PLvaryfrom, TLvaryfrom, SGvaryfrom
tries to compensate the weakness of the boolean operations in
combination with the weakness of 64 Bit numeric and the weakness of the
delaunay implementation of matlab.
this fnctn takes a solid and adds small values to the position of the solid to avoid problems with boolean operations!
Helpful in combination with SGunion, SGsubtract and SGsubtractnaddTL
See Also: TLvaryfrom
, PLvaryfrom
, SGvaryfrom
, VLseparate
Example Illustration
Syntax
VLN=VLvaryfrom(VL,[dd,rr])
Input Parameter
VL: | | Vertex list |
dd: | | [dx dy dz]; default is [1 1 1]/1234 |
rr: | | [wx wy wz]; default is [1 1 1]*34/14333 |
Output Parameter
Examples
VLvaryfrom(VLaddz(PLsquare(4),1))
Copyright 2022-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 function, VLvaryfrom, is designed to modify a vertex list by adding small deterministic values to it. This is done to mitigate issues with boolean operations and numerical precision in MATLAB's Delaunay implementation.
Input Parameters
- VL: The vertex list that needs to be modified.
- dd: A vector [dx, dy, dz] representing small displacements in the x, y, and z directions. The default value is [1, 1, 1]/1234.
- rr: A vector [wx, wy, wz] representing additional small random displacements. The default value is [1, 1, 1]*34/14333.
Output
- VLN: The new vertex list with added small values.
Function Workflow
The function VLvaryfrom calls another function PLvaryfrom with the vertex list and any additional parameters passed to it. This suggests that the actual modification of the vertex list is handled by PLvaryfrom.
Additional Behavior
If no output is requested (i.e., nargout == 0), the function will plot the original vertex list using CVLplot with red asterisks ('r*') as markers. The plot is displayed within a figure window with a range from -30 to 30 on both axes, as set by SGfigure(-30,30).
Example Usage
An example call to the function is provided: VLvaryfrom(VLaddz(PLsquare(4),1)). This suggests that the function can be used in conjunction with other functions like VLaddz and PLsquare to manipulate geometric shapes.
Algorithm explaination created using ChatGPT on 2025-08-19 01:16. (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