Syntax
[VL,FL,CL]=VLFLspherecurvedGPL(GPL,R,CEL)
Input Parameter
GPL : | | Grid point list in 2D (x z) |
R : | | Radius (-x) |
CEL : | | Contour edge list rel. to GPL |
Output Parameter
VL : | | Vertex list |
FL : | | Facet list |
CL : | | Contour vertex list |
Copyright 2013-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, VLFLspherecurvedGPL
, is designed to generate a 3D sphere-curved surface grid from a 2D grid point list. It is part of the VLFL-Library and was created by Tim Lueth in 2013.
Input Parameters
- GPL: A 2D grid point list, containing coordinates in the x and z dimensions.
- R: The radius of the sphere, which is used to calculate the curvature of the surface.
- CEL: A contour edge list that is relative to the grid point list (GPL).
Output Results
- VL: The vertex list, which contains the 3D coordinates of the vertices on the sphere-curved surface.
- FL: The facet list, which defines the triangular facets of the surface using indices into the vertex list.
- CL: The contour vertex list, which contains the vertices that form the contour of the surface.
Algorithm Steps
- Create a Delaunay triangulation from the grid point list (GPL) and contour edge list (CEL) using
DelaunayTri
. This generates a triangulation object dt
.
- Extract the triangulation facets from
dt
and assign them to FL
.
- Update
GPL
with the points from the triangulation object dt.X
.
- Determine the in-out status of the points in the triangulation using
inOutStatus(dt)
, which identifies contour points.
- Compute the convex hull of the triangulation using
convexHull(dt)
, which identifies the convex hull points.
- Calculate the z-coordinates of the vertices using the formula
z = R * cos(GPL(:,1)/R) * sin(GPL(:,2)/R)
.
- Calculate the y-coordinates of the vertices using the formula
y = R * sin(GPL(:,1)/R)
.
- Calculate the x-coordinates of the vertices using the formula
x = -R + R * cos(GPL(:,1)/R) * cos(GPL(:,2)/R)
.
- Combine the x, y, and z coordinates into the vertex list
VL
.
- Assign the facets corresponding to the contour points to
FL
.
- Extract the contour vertices from the convex hull points and assign them to
CL
.
- Plot the grid using the function
VLFLplot(GPL, FL)
.
Algorithm explaination created using ChatGPT on 2025-08-18 23:47. (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