VLFLcylinder

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 1.0, Creation date: 2010-11-20, Last change: 2025-09-14

calculates vertex list and facet list for a cylinder

Description

[VL,FL]=VLFLcylinder (Z, R, f, o) generates an sweept polyder of height Z with radius R and f edges. With o==1 or o==-1 the normal vectors are outside (1) or inside (-1).
This function looks similar to VLFLellipse, but seems to be an earlier version, and calculates a solid object. In case of a hollow cylinder, it is not possible to print it in SLS. So, there is a need for a CSG subtraction.

See Also: VLFLcylinder , VLFLellipse1 , VLFLdome

Example Illustration

 missing image of VLFLcylinder(Z,R,f,o)

Syntax

[VL,FL]=VLFLcylinder(Z,R,f,o)

Input Parameter

Z: Height of the cylinder
R: Radius of the cylinder
f: Number of facets of the cylinder
o: direction (1=outward, -1=inwards) of the facets

Output Parameter

VL: Vertex list of the cylinder
FL: Facet list of the cylinder

Examples

Calucate a hollow cylinder (cannot printed in SLS)
[V1,F1]=VLFLcylinder (4,1,4,1); [V2,F2]=VLFLcylinder (4-2,1-2,4,-1);
[VL,FL]=VLFLcat(V1,F1,V2,F2);
VLFLwritestl (VL,FL,'CYL', 'a cylinder');
VLFLplot (VL,FL,'g')




Copyright 2010-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

Last html export of this page out of FM database by TL: 2025-09-21