PL=[0 0; 10 0; 10 10; 0 10]
% A point cloud differs from a point list in that the order of the points of
% Basically, it is only an array [n x 2]
SGfigure(0,90); figsize([320 240]); % figure; view(0,90)
PLplot(PL,'r.-',2); % Display as an open point list
% Further functions for the creation of points lists
% _PLsample, PLcircle, PLcircseg, PLevolvente, PLgearDIN, PLhelix, PLkidney,
% PLrand, PLspiral, PLstar usw._
% CPL = Closed Point List
% A list of 2D point coordinates to describe several preferably closed contours
% Abbreviation CPL stands for Closed Point List
CPL=[0 0; 10 0; 10 10; 0 10; nan nan; -10 -10; -10 20 ; 20 20 ; 20 -10 ]
0 0
10 0
10 10
0 10
NaN NaN
-10 -10
-10 20
20 20
20 -10
% The individual contours are separated in the point list by a line with NaN
% NaN. The concept is very powerful. The individual contours do not have to, but
% should have an identical start point and end point so that they are marked as
% closed. This is not the case in this example.
% If several closed contours are used, whereby one contour lies within another
% contour, then the inner contour can be interpreted as a hole. If a CPL is used
% in this way, Matlab has called them polyshapes since 2017b. The SG-Lib, which
% has existed since 2012, calls them closed polyshapes. Since Matlab itself changes
% and renames its concepts over time, especially in the field of geometry (polyshape,
% alphashape, Delaunay tringulation, etc.), it is important to remain mentally
% free of a current Matlab version.
% Basically, a CPL is an array in the format [n x 2]
SGfigure(0,90); figsize([320 240]); % figure; view(0,90)
PLplot(CPL,'r.-',2); % Display CPL as PL
CPSplot(CPL,'r'); % Display as CPS Closed Polyshape
% Notes on further Matlab concepts and Matlab classes
% Matlab also offers other data formats and classes such as polybool (before
% 2006) and polyshape (2017b) for describing contours.
% Further functions for the creation of closed points lists
stamp
stamp: Mac OSX 15.6.1 | R2024b Update 6 | SG-Lib | Java 11.0.24+8-LTS | M3-PRO 12-Core CPU, 18-Core GPU 36GByte RAM | 21-Sep-2025 16:08:16