Syntax
[SG,FLW,FLA,FLB]=SGconetruncated([R1,R2,H,n])
Input Parameter
R1 : | | Bottom Radius |
R2 : | | Top Radius |
H : | | Height |
n : | | Option number of polygon points |
Output Parameter
SG : | | Solid Geometry |
FLW : | | Facet list of Wall |
FLA : | | Facet list of Floor |
FLB : | | Facet list of Roof |
Examples
SGconetruncated(210/2, 185/2, 14)
Copyright 2020-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, SGconetruncated, generates a truncated cone using the given parameters. It is part of the SolidGeometry library and was introduced in version 5.0.
Input Parameters
- R1: Bottom radius of the truncated cone. Default is 100 if not provided.
- R2: Top radius of the truncated cone. Default is R1/1.5 if not provided.
- H: Height of the truncated cone. Default is R1/5 if not provided.
- n: Option number of polygon points. Default is an empty string if not provided.
Output Results
- SG: Solid Geometry of the truncated cone.
- FLW: Facet list of the wall of the cone.
- FLA: Facet list of the floor of the cone.
- FLB: Facet list of the roof of the cone.
Algorithm Steps
- Retrieve the input parameters R1, R2, H, and n using the function getfuncparams. Default values are used if parameters are not provided.
- If n is greater than 0, adjust R1 and R2 using a function dofn(n) (commented out in the code).
- Generate circular polygon lists CPL1 and CPL2 for the bottom and top of the cone using the function PLcircle with radii R1 and R2, respectively.
- Call the function SGof2CPLz with CPL1, CPL2, and H to generate the solid geometry SG and facet lists FLW, FLA, and FLB.
- If no output arguments are specified, plot the solid geometry using SGfigure and SGTplotalpha functions.
Algorithm explaination created using ChatGPT on 2025-08-18 23:45. (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