Syntax
[PL,nvv]=VLplaneprojection(VL,nv)
Input Parameter
VL : | | Vertex list |
nv : | | normal ez vector; |
Output Parameter
PL : | | Point list |
nvv : | | adjusted ez vector ([0 0 1], [ 1 0 0]. or [0 1 0] |
Examples
VLplaneprojection (rand(30,3),[.9 0 1]);
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
Algorithm (Workflow)
This function, VLplaneprojection
, projects a list of vertices onto an orthogonal plane defined by a normal vector. It is part of the SolidGeometry library and was introduced in version 4.9.
Input Parameters
- VL: A list of vertices. This is a matrix where each row represents a vertex in 3D space.
- nv: A normal vector that defines the plane onto which the vertices will be projected. If not provided, the default is [0 0 1], which corresponds to the XY plane.
Output Results
- PL: A list of points that are the projection of the vertices onto the specified plane.
- nvv: The adjusted normal vector, which will be one of [0 0 1], [1 0 0], or [0 1 0], indicating the plane of projection (XY, YZ, or XZ, respectively).
Algorithm Steps
- Check the number of input arguments. If only one argument is provided, set the normal vector
nv
to [0 0 1]. Otherwise, normalize the provided normal vector using the normr
function.
- Check the number of output arguments. If no output is expected, call the function
PLofVLplaneprojection
with the vertex list and normal vector. This function handles the projection and displays the result.
- If output is expected, call
PLofVLplaneprojection
to obtain the projected point list PL
and the adjusted normal vector nvv
.
Example Usage
To project a random set of 30 vertices onto a plane defined by the normal vector [0.9 0 1], use the following command:
VLplaneprojection(rand(30,3),[.9 0 1]);
Algorithm explaination created using ChatGPT on 2025-08-18 22:57. (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