camofVLFLfi

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 5.1, Creation date: 2021-04-06, Last change: 2025-09-15

shows to a specific facet for inspecting a facet of interest



See Also: camofT , VLFLplotfi

Example Illustration

 missing image of camofVLFLfi(VL,FL,fi,gf)

Syntax

camofVLFLfi(VL,FL,[fi,gf])

Input Parameter

VL: Vertex list
FL: Facet list
fi: facet
gf: grow arund factor; default is 10

Examples


SGsphere(10); SG=ans; camofVLFLfi(SG.VL,SG.FL,1000)
SGsphere(10); SG=ans; camofVLFLfi(SG.VL,SG.FL,1000,30)




Copyright 2021-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, camofVLFLfi, is designed to visualize a specific facet of a 3D object for inspection. It is part of the SolidGeometry library and was introduced in version 5.1. The function takes in a vertex list, a facet list, and optionally a facet index and a grow-around factor.

Input Parameters

Algorithm Steps

  1. Initialize the structure SG with the vertex list VL and facet list FL.
  2. Retrieve the facet index fi and grow-around factor gf from the input parameters using getfuncparams.
  3. If fi is empty, loop through all facets with a step size of 2, calling camofVLFLfi recursively for each facet, and pause briefly between iterations.
  4. Calculate the mean position P of the vertices forming the specified facet.
  5. Compute the average normal vector ez of the facet using VLFLfaceNormal. If the normal is invalid, default to [0 0 1].
  6. Ensure P is a 3D point by appending a zero if necessary.
  7. Generate a transformation matrix T using TofPez and apply a small rotation with TofR.
  8. Apply the transformation T using camofT.
  9. Zoom into the facet using zoomVL with the specified grow-around factor gf.

Example Usage

To visualize a specific facet of a sphere:

SGsphere(10); 
SG = ans; 
camofVLFLfi(SG.VL, SG.FL, 1000);

To visualize with a custom grow-around factor:

SGsphere(10); 
SG = ans; 
camofVLFLfi(SG.VL, SG.FL, 1000, 30);
Algorithm explaination created using ChatGPT on 2025-08-19 01:01. (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