Syntax
VL=VLmeshgrid(xx,yy,[zz])
Input Parameter
xx : | | list of x values |
yy : | | list of y values |
zz : | | list of y values; |
Output Parameter
VL : | | Point list of all mesh coordinates |
Examples
VLmeshgrid(1:3,1:2,10)
VLmeshgrid([0 15 25 35 45 55 65],0:8:8*22,[10 20])
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 function, VLmeshgrid
, is designed to generate a list of 3D mesh coordinates based on input vectors for x, y, and optionally z dimensions. It is part of the SG-Library and was introduced in SolidGeometry 4.0.
Input Parameters
- xx: A list of x values.
- yy: A list of y values.
- zz: A list of z values. If not provided, defaults to 0.
Output
- VL: A point list of all mesh coordinates.
Algorithm Steps
- Initialize
zz
to 0. If a third argument is provided and is not empty, set zz
to this value.
- Use the
meshgrid
function to create 3D grids XL
, YL
, and ZL
from xx
, yy
, and zz
.
- Reshape these grids into column vectors and concatenate them to form the output
VL
.
- If only two input arguments are provided, adjust
VL
to include only the x and y coordinates.
- If no output is requested, plot the points using
SGfigure
and CVLplot
. Adjust the view based on the number of input arguments.
Example Usage
VLmeshgrid(1:3,1:2,10)
: Generates a mesh grid with x values from 1 to 3, y values from 1 to 2, and a constant z value of 10.
VLmeshgrid([0 15 25 35 45 55 65],0:8:8*22,[10 20])
: Generates a mesh grid with specified x values, y values from 0 to 176 in steps of 8, and z values of 10 and 20.
Algorithm explaination created using ChatGPT on 2025-08-19 00:15. (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