SGofCPLrot
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 2.0, Creation date: 2014-11-29, Last change: 2025-09-14
returns a solid geometry from of a z-axis rotated closed polygon list
Description
Basic modeling procedure such as SGofCPLz. An important feature of this procedure is the insertion on contour points that make it possible to separate the object easily in z. Nevertheless, if case that embeded circles are rotated a remarkable number of new points are inserted at the outside contour.
See Also: SGofCPLsphere
, SGofCPLz
, SGofCPLT
, CPLcutPez
Example Illustration
Syntax
SG=SGofCPLrot(CPL,[n,rcorr])
Input Parameter
CPL: | | Radius-Z List |
n: | | optional number of edges of the rotated polygon |
rcorr: | | true = increase that R is on circle; default R is incircle |
Output Parameter
SG: | | Solid Geometry (SG.VL, SG.FL, SG.CPL) |
Examples
CPL=[0 0; 20 0; 20 10; 0 10; NaN NaN; 1 1; 9 1; 9 9; 1 9; NaN NaN; 2 2; 8 2; 8 8; 2 8 ];
CPL(:,1)=CPL(:,1)+5
CPL=PLcircle(10);
CPL=[0 10; 2 8; 0 5; 0 4; 4 1; 0 0];
A=SGofCPLrot (CPL); SGchecker(A);
VLFLviewer(A); VLFLplotlight (1,0.5), view(-30,30);
figure(2); PLELofCPL(A.CPL);
Copyright 2014-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, SGofCPLrot, generates a solid geometry by rotating a closed polygon list (CPL) around the z-axis. It is part of the SG-Library and was developed by Tim Lueth. The function is designed to facilitate the modeling of 3D objects from 2D profiles.
Input Parameters
- CPL: A list of radius and z-coordinates that define the closed polygon to be rotated.
- n: (Optional) Specifies the number of edges for the rotated polygon. If not provided, a default value is used.
- rcorr: A boolean parameter. If set to true, it adjusts the radius to ensure it is on the circle. By default, the radius is considered as the incircle.
Output
- SG: The resulting solid geometry, which includes vertex list (SG.VL), face list (SG.FL), and the original closed polygon list (SG.CPL).
Function Workflow
The function begins by calling VLFLofCPLrot with the provided CPL and any additional parameters. This internal function handles the core computation of generating the vertex and face lists for the solid geometry.
If no output is requested (i.e., nargout==0), the function automatically visualizes the generated solid geometry using SGfigure and sets the view to a specific angle (-30, 30).
Example Usage
An example is provided in the comments, demonstrating how to create a CPL, adjust it, and then generate and visualize the solid geometry using SGofCPLrot. The example also shows how to use other related functions like SGchecker, VLFLviewer, and VLFLplotlight to further manipulate and view the geometry.
Algorithm explaination created using ChatGPT on 2025-08-19 08:10. (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