T=TofPCVL(PCVL)
PCVL : | Planar contour vertex list |
T : | Transformation matrix |
VLtransT(VLaddz(PLcircle(10)),TofR([pi/3, pi/3 0],[10 0 0 ])); CVL=ans;
TofPCVL(CVL)
This function, TofPCVL
, computes a transformation matrix for a planar contour vertex list (PCVL). The algorithm is part of the SolidGeometry library and is designed to handle planar contours by using the first three points to define a plane.
VLremstraightCVL
on the input PCVL
to remove any collinear points, resulting in PCVLN
.PCVLN
has fewer than three points. If so, it raises an error, as at least three points are needed to define a plane.Tof3P
with the first three points of PCVLN
to compute the initial transformation matrix T
.T
is set to the mean of the points in PCVLN
, effectively centering the transformation at the average position of the contour.nargout == 0
), the function will plot the contour and the transformation using SGfigure
, VLplot
, and tplot
.The function is part of a series of transformations and procedures developed by Tim C. Lueth, with various versions and improvements over the years. It is designed to work with other functions in the SolidGeometry library, such as VLFLcoatPCVL
, CVLplot
, and TofVL
.