VLFLplotalpha

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 4.9, Creation date: 2020-01-11, Last change: 2025-09-14

plots a solid support directly color and alpha value

Description

This function was written 2019-06-12 in Tokyo visiting Hajime Asama's Lab at The University of Tokyo

See Also: SGplot , setplotlight , SGplotalpha

Example Illustration

 missing image of VLFLplotalpha(VL,FL,c,a,e)

Syntax

h=VLFLplotalpha(VL,FL,[c,a,e])

Input Parameter

VL: Vertex List
FL: Facet List
c: color; default is [];
a: alpha value; default is [];
e: edge color; default is [];

Output Parameter

h: handle to graphics object patch

Examples


A=SGbox([30,20,10])
SGfigure; view(-30,30); VLFLplotalpha(A.VL,A.FL,'r',0.9)
SGfigure; view(-30,30); VLFLplotalpha(A.VL,A.FL,'r',0.9,'k')




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, VLFLplotalpha, is designed to plot a 3D solid object using vertex and facet lists, with options for color, transparency, and edge color. It is part of the SolidGeometry library and was developed by Tim Lueth.

Input Parameters

Output

Algorithm Steps

  1. Check if the facet list FL is empty. If it is, a warning is issued, and the function returns an empty handle.
  2. Retrieve the color parameter c using getfuncparams with a default of an empty array.
  3. Retrieve the alpha value a using getfuncparams with a default of 1.
  4. Retrieve the edge color e using getfuncparams with a default of an empty array.
  5. Call VLFLplot with VL and FL to create the initial plot and store the handle in h.
  6. Call setplotlight with the handle h, color c, and alpha value a to set the lighting and transparency of the plot.
  7. If the edge color e is not empty, set the edge color of the plot using set(h,'EdgeColor',e).
  8. Call camlightTL to adjust the camera lighting.
  9. Set the material properties of the plot to 'metal' using material metal.

Example Usage

The function can be used to plot a box with specified dimensions and view settings:

A=SGbox([30,20,10])
SGfigure; view(-30,30); VLFLplotalpha(A.VL,A.FL,'r',0.9)
SGfigure; view(-30,30); VLFLplotalpha(A.VL,A.FL,'r',0.9,'k')

In this example, a box is created and plotted with a red color and 0.9 transparency. The second plot also specifies a black edge color.

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