Syntax
CPLS=CPLsweepTL(CPL,TL)
Input Parameter
CPL : | | Contour with Center |
TL : | | HT list [3 x 3 x n] with n frames |
Output Parameter
CPLS : | | CPLunion of all transformed CPLs |
Examples
Posesample(10); PS=ans;
fourBarposesyntheses(Posesample(10),[2 3 4],[10 1 1]); PS=ans;
fourBarposeCPLmotion(PS,1); [PL0,TL0,wcr,TA1,TB1,TA0,TB0]=fourBarposeCPLmotion(PS,1);
CPLsweepTL(PLsquare(5,3),TL0); CPLN=ans;
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, CPLsweepTL
, is designed to compute the contour of a path-swept contour using a given contour and a series of transformation matrices. It is part of the SolidGeometry library and is used for geometric transformations and operations.
Input Parameters
- CPL: This is the initial contour with a center. It represents the shape that will be transformed and swept along a path.
- TL: This is a 3x3xN array representing a list of homogeneous transformation matrices. Each 3x3 matrix corresponds to a transformation frame, and there are N such frames.
Output
- CPLS: This is the resulting contour after applying all transformations and performing a union of all transformed contours.
Algorithm Steps
- Determine the number of transformation frames,
nt
, from the third dimension of TL
.
- Initialize an empty list
CPLS
to store the union of transformed contours.
- Iterate over each transformation frame:
- Transform the initial contour
CPL
using the current transformation matrix TL(:,:,i)
by calling PLtransT
.
- Perform a union of the current transformed contour with
CPLS
using CPLunion
.
- Remove straight lines with minimal length from
CPLS
using CPLremstraightAmin
.
- If no output argument is specified, plot the results:
- Open a new figure using
SGfigure
.
- Plot the final swept contour
CPLS
in green using CPSplot
.
- Plot the initial transformed contour in red.
- Extract and plot the path of transformations in magenta using
PLplot
.
- Add annotations to the plot to describe the color coding.
Algorithm explaination created using ChatGPT on 2025-08-19 01:23. (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