VLFLring
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 1.0, Creation date: 2012-10-31, Last change: 2025-09-14
returns vertex list and facet list of a ring
See Also: , VLFLdome
, VLFLpost
, VLFLcap
, VLFLcone
, VLFLsnaprivet
, VLFLellipse1
, VLFLellipse2
, VLFLellipse3
, VLFLyarn
, VLFLweave
Example Illustration
Syntax
[VL,FL]=VLFLring([r,n,h,w])
Input Parameter
r: | | Radius of the ring; default is 10 |
n: | | number of facets; default is nofrd |
h: | | height of the ring |
w: | | width of the ring; default is r/2 |
Output Parameter
VL: | | Vertex list of the ring |
FL: | | Facet list of the ring |
Copyright 2012-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 algorithm generates a 3D ring model by computing its vertex and facet lists. It is part of the SG-Library and was created by Tim Lueth. The function is called VLFLring and takes up to four input parameters.
Input Parameters
- r: Radius of the ring. Default value is 10.
- n: Number of facets. Default is determined by the function
nofrd based on the radius.
- h: Height of the ring. Default is half of the radius.
- w: Width of the ring. Default is half of the radius.
Output Results
- VL: Vertex list of the ring.
- FL: Facet list of the ring.
Algorithm Steps
- Initialize default values for
r, n, h, and w.
- Check if input arguments are provided and update the parameters if valid values are given.
- Calculate the outer circle points using
PLcircle with radius r and n facets.
- Calculate the inner circle points using
PLcircle with radius r-w and n facets.
- If the width
w is greater than 0, concatenate the outer and inner circle points and their respective edge lists using VLELcat2.
- If the width
w is 0, use only the outer circle points and edge list.
- Close the vertex and edge list to form a 3D ring using
VLFLcloseVLELh with height h.
- Return the vertex list
VL and facet list FL.
Algorithm explaination created using ChatGPT on 2025-08-18 23:42. (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