CPLfaceplot

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 3.4, Creation date: 2017-02-08, Last change: 2025-09-14

plots the faces of a CPL

Description

In contrast to CPLplotasPS, this function is not using the polyshape concept but the delaunay concept

See Also: CPLplotasPS , CPLplot , CPLplotregions , CPLplotcolors , CPLplotinout

Example Illustration

 missing image of CPLfaceplot(PL,c,w,a)

Syntax

h=CPLfaceplot(PL,[c,w,a])

Input Parameter

PL: Point List or CPL
c: color
w: countour width
a: alpha; default is 0.5

Output Parameter

h: handle

Examples


SGfigure;
CPLfaceplot([PLcircle(20);NaN NaN; [0 0; 10 0; 5 5]],'b',0.1)




Copyright 2017-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, CPLfaceplot, is designed to plot the faces of a Closed Polygon List (CPL) using the Delaunay triangulation concept. Below is a detailed explanation of the algorithm and its parameters:

Input Parameters

Output

Algorithm Steps

  1. The function first checks if the input PL is empty. If it is, the function returns an empty handle h and exits.
  2. It then assigns default values to the parameters c, w, and a if they are not provided in the function call.
  3. The function converts the Point List PL into a Closed Polygon List CPL using the function CPLofPL.
  4. If the contour width w is greater than 0, the function calls CPLplot to plot the outline of the CPL with the specified color and width.
  5. If the alpha value a is greater than 0, the function performs the following steps:
    • It uses PLFLofCPLdelaunay to obtain the Point List PL and Face List FL from the CPL using Delaunay triangulation.
    • The function then calls VLFLplot to plot the vertices and faces with the specified color.
    • It sets the transparency of the plot using alpha(h,a), and applies flat lighting and shading to the plot.
Algorithm explaination created using ChatGPT on 2025-08-19 01:37. (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