SGofCPLztwist

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 5.2, Creation date: 2022-04-07, Last change: 2025-09-15

Creates twisted solids from a CPL and a turning angle

Description

In contrast to SGofCPLtransT, this function allows several turns.
Works differnt to SGsteepspindle

See Also: SGofCPLz , SGofCPLtransT , SGsteepspindle

Example Illustration

 missing image of SGofCPLztwist(CPL,z,w)

Syntax

SG=SGofCPLztwist([CPL,z,w])

Input Parameter

CPL: CPL (centered at origin)
z: height or [zmin zmax]
w: turning angle

Output Parameter

SG: solid geometry

Examples


SGofCPLztwist(PLrope([2 0.3],[1 .5],true),10)
SGofCPLztwist(PLrope([2 0.3],[1 .5],false),10)
SGofCPLztwist(PLrope([4 1],[1 .5],true),5)
SGofCPLztwist(PLrope([4 1],[1 .5],false),5)




Copyright 2022-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, SGofCPLztwist, creates twisted solids from a given center profile line (CPL) by applying a series of transformations. It is part of the SolidGeometry library and was introduced in version 5.2.

Input Parameters

Algorithm Steps

  1. Retrieve the input parameters using the getfuncparams function. Default values are provided for each parameter if not specified.
  2. Calculate the bounding box size s of the CPL using sofBB and BBofCPL.
  3. Determine the number of segments n required for the twist based on the size s and the turning angle w.
  4. If n is zero, adjust the turning angle w to ensure at least one segment is created.
  5. Calculate the incremental changes in height dz and angle dw for each segment.
  6. Initialize a transformation matrix TL to store the transformations for each segment.
  7. Loop through each segment, calculating the transformation matrix using TofPez for the current height and angle.
  8. Apply the transformations to the CPL using SGofCPLtransT to create the twisted solid.
  9. If no output is specified, visualize the result using SGfigure and SGTplotalpha, and annotate the plot with the number of segments.
Algorithm explaination created using ChatGPT on 2025-08-19 08:11. (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