Syntax
viewVLinspect(VL,[vi])
Input Parameter
VL : | | Vertex list |
vi : | | optional index list to VL |
Examples
SGbox; A=ans; viewVLinspect(A.VL,5:8)
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, viewVLinspect
, is designed to inspect points in a vertex list (VL) one by one. It is part of the SolidGeometry library and was introduced in version 4.9. The function is primarily used for user interface purposes.
Input Parameters
- VL: This is the vertex list, a matrix where each row represents a vertex in 3D space.
- vi: This is an optional parameter. It is an index list that specifies which vertices in the VL to inspect. If not provided, all vertices are considered.
Algorithm Steps
- Determine the number of vertices,
n
, in the vertex list VL
using size(VL,1)
.
- Store the current axis limits in
bb
using axis
.
- Use
getfuncparams
to determine the indices of vertices to inspect, defaulting to all vertices if vi
is not provided.
- Plot the specified vertices using
VLplot
with red asterisks ('r*').
- Call
zoomVL
to adjust the view to the specified vertices.
- Calculate the scale factor
s
using sofgca
.
- Create a circle in the plane using
PLcircle
and convert it to a closed polyline CPL
using CPLofPL
.
- Iterate over each vertex index in
vi
:
- Set the camera target to the current vertex using
set(gca,'CameraTarget',VL(i,:))
.
- Transform the circle polyline
CPL
to the current vertex position using Tofcam
and VLtransT
.
- Plot the transformed circle and the current vertex using
CVLplot
and VLplot
, respectively.
- Add an annotation displaying the current index using
plotannotation
.
- Pause execution to allow inspection of the current vertex.
- Delete the current plots using
delete(h)
.
- After the loop, delete the initial plot of vertices using
delete(h1)
.
Algorithm explaination created using ChatGPT on 2025-08-18 23:29. (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