VMginput

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 3.6, Creation date: 2017-03-20, Last change: 2025-09-14

returns a point position by clicking into VMplot

Description

This function is based on ginput, waitforbuttonpress, get(gca,'CurrentPoint').
If the window is magnified, it has to be in the center of the screen

See Also: VMplot , VMgetSubplot

Example Illustration

 missing image of VMginput(n,u)

Syntax

[PL,t]=VMginput([n,u])

Input Parameter

n: number of points
u: update VMplot; default is true

Output Parameter

PL: position
t: subplot




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, VMginput, is designed to capture user input points from a plot, similar to MATLAB's ginput function. It is part of the SG-Library and is used in conjunction with VMplot and VMgetSubplot.

Input Parameters

Output Results

Algorithm Steps

  1. Initialize the number of points n and update flag u based on input arguments.
  2. Initialize empty arrays PL and TL to store point positions and subplot indices.
  3. Loop for n times to capture points:
  4. If no output arguments are specified and PL is not empty, plot the 3D result in subplot 3:
Algorithm explaination created using ChatGPT on 2025-08-19 01:40. (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