CVLofCPLbendsinus

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CVL/Closed Vertex Lists
Introduced first in SolidGeometry 5.0, Creation date: 2020-09-14, Last change: 2025-09-14

returns a wave-shape-bended CVL from a CPL



See Also: VLaddz , CPLaddauxpoints , PLFLofCPLdelaunayGrid , CVLofCPLbendspherical , SGbending

Example Illustration

 missing image of CVLofCPLbendsinus(CPL,dim,hwv,scl)

Syntax

CVL=CVLofCPLbendsinus(CPL,[dim,hwv,scl])

Input Parameter

CPL: CPL
dim: wave dimension; default is 'x'
hwv: number of sin waves; default is 1
scl: default is sofCPL/10

Output Parameter

CVL: Final CVL

Examples


CVLofCPLbendsinus(CPLaddauxpoints(CPLsample(37),1),'',1);
CVLofCPLbendsinus(CPLaddauxpoints(CPLsample(37),1),'x',.5,50); % strong bending




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, CVLofCPLbendsinus, is designed to apply a sinusoidal wave transformation to a Closed Polygon List (CPL) and return a Closed Vertex List (CVL). The function is part of the SolidGeometry library and was introduced in version 5.0.

Input Parameters

Output

Algorithm Steps

  1. Calculate the size and bounding box of the CPL using sofBB and BBofCPL.
  2. Retrieve the parameters dim, hwv, and scl using getfuncparams, with defaults as specified.
  3. Initialize the CVL by adding a zero z-coordinate to the CPL using VLaddz.
  4. Determine the minimum x-coordinate in the CVL and the corresponding minimum z-coordinate.
  5. Apply a sinusoidal transformation to the z-coordinates of the CVL based on the x-coordinates, using the formula: scl * sin((CVL(:,1) - mx) / ss(1) * 2 * pi * hwv).
  6. Optionally, plot the transformed CVL and the original CPL if no output is requested, using SGfigure, CVLplot, and CPLplot.

Example Usage

Two examples are provided to demonstrate the function:

Algorithm explaination created using ChatGPT on 2025-08-19 06:43. (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