Syntax
[b,a,o]=VLisbelowT(VL,[T,thr])
Input Parameter
VL : | | Vertex List |
T : | | Frame the describe plae |
thr : | | threshold for on; default is 1e-5 |
Output Parameter
b : | | logical of below |
a : | | logical of above |
o : | | logical of on |
Examples
VL=rand(10,3); VLisbelowT(VL,TofPez([0 0 1],[0 1 1 ]))
Copyright 2021-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, VLisbelowT
, determines the position of a list of points relative to a plane defined by a frame. It returns logical arrays indicating whether points are below, above, or on the plane.
Input Parameters
- VL: A vertex list, which can be a list of points or a cell list of frames.
- T: A transformation matrix representing the frame that describes the plane.
- thr: A threshold value to determine if a point is "on" the plane. The default value is 1e-5.
Output Results
- b: A logical array indicating if points are below the plane.
- a: A logical array indicating if points are above the plane.
- o: A logical array indicating if points are on the plane.
Algorithm Steps
- Check if
VL
is a cell. If so, extract the transformation matrix and update VL
to be the list of points.
- Retrieve the transformation matrix
T
and threshold thr
from the input parameters, using default values if not provided.
- Transform the vertex list
VL
using the inverse of the transformation matrix T
.
- Determine the position of each point relative to the plane:
- Points with a z-coordinate greater than
thr
are above the plane.
- Points with a z-coordinate less than
-thr
are below the plane.
- Points with a z-coordinate within the range
[-thr, thr]
are on the plane.
- If no output arguments are specified, plot the points using different colors to indicate their position relative to the plane:
- Green for points below the plane.
- Red for points on the plane.
- Blue for points above the plane.
Algorithm explaination created using ChatGPT on 2025-08-19 00:56. (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