Syntax
[VL,FL]=VLFLbolt(R,H)
Input Parameter
R : | | Outer Radius |
H : | | Height |
Output Parameter
VL : | | Vertex list |
FL : | | Facet 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 algorithm generates a 2.5D solid geometry of a bolt using a vertex list (VL) and a facet list (FL). The function is designed to create a cylindrical shape based on the given parameters.
Input Parameters
- R: Outer Radius of the bolt. It defines the size of the bolt's circular base.
- H: Height of the bolt. It determines the vertical dimension of the bolt.
Output Results
- VL: Vertex list. It contains the coordinates of the vertices that define the shape of the bolt.
- FL: Facet list. It describes the triangular facets that make up the surface of the bolt.
Algorithm Steps
- Set
n
to 16, which is the number of segments used to approximate the circular base of the bolt.
- Calculate
dw
as 2*pi/n
, which is the angular increment for each segment.
- Initialize
w
to -dw/2
to start the angle from the midpoint of the first segment.
- Create a zero matrix
PL
with dimensions n x 2
to store the 2D coordinates of the circle's vertices.
- Iterate over each segment from 1 to
n
:
- Increment
w
by dw
.
- Calculate the x and y coordinates using
cos(w)*R
and sin(w)*R
, respectively.
- Store the coordinates in the
PL
matrix.
- Call the function
VLFLofPLz(PL,H)
to generate the vertex and facet lists based on the 2D profile PL
and height H
.
- Return the vertex list
VL
and facet list FL
.
Algorithm explaination created using ChatGPT on 2025-08-18 23:35. (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