SGofCPLsphere
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 2.1, Creation date: 2015-02-22, Last change: 2025-09-14
returns solid geometry of a wrapped shell
See Also: SGofCPLsphere
, SGofCPLz
, SGofCPLT
Example Illustration
Syntax
SG=SGofCPLsphere(CPL,Ri,d,[ns])
Input Parameter
CPL: | | Closed Polygon List |
Ri: | | Radius of the sphere used for wrapping |
d: | | Thickness/height of the shell |
ns: | | distance between auxiliary points; default is sofrd(Ri) |
Output Parameter
Examples
Create an wrapped circular patch
SGofCPLshere(CPLofPL({PLcircle(30),PLcircle(10)}),20,0.5)
Copyright 2015-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, SGofCPLsphere, generates a solid geometry of a wrapped shell based on a closed polygon list (CPL) and a sphere. Below is a detailed explanation of the algorithm and its parameters.
Input Parameters
- CPL: A Closed Polygon List that defines the shape to be wrapped around the sphere.
- Ri: The radius of the sphere used for wrapping the CPL.
- d: The thickness or height of the shell to be created.
- ns: (Optional) The distance between auxiliary points. If not provided, it defaults to
sofrd(Ri).
Output
- SG: The resulting solid geometry of the wrapped shell.
Algorithm Steps
- Initialize
ns to sofrd(Ri). If a fourth argument is provided and is not empty, set ns to this value.
- Call
VLFLspherecurvedCPL with CPL, Ri, and ns to obtain vertex list A.VL, face list A.FL, and contour face list C.FL.
- Reorder the face list
A.FL to change the order of vertices.
- Call
VLFLspherecurvedCPL again with adjusted parameters to obtain B.VL and B.FL for the outer shell.
- Adjust the x-coordinates of
B.VL by adding d.
- Concatenate vertex lists
A.VL and B.VL into C.VL.
- Combine geometries
A and B using SGcat2 to form SG.
- Append contour face list
C.FL to SG.FL.
- If no output is requested, plot the geometries using
SGplot and VLFLplotlight.
Subfunction: VLFLspherecurvedCPL
This subfunction generates vertex and face lists for a curved polygon list on a sphere.
- Convert the CPL to a polygon list
PL and edge list EL using PLELofCPL.
- Generate vertex list
VL and face list FL using VLFLspherecurvedPLEL.
- Determine the number of vertices
n.
- Create a contour wall face list
FLw using FLcontourwallELn.
Algorithm explaination created using ChatGPT on 2025-08-19 01:40. (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