Syntax
selectCameraPosition([p])
Input Parameter
p : | | point to set; default is empty |
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, selectCameraPosition
, is designed to set the camera position in a graphical user interface. It is part of the SG-Library and was created by Tim Lueth on February 21, 2017. The function is categorized under the user interface class.
Input Parameters
- p: This is the point to set the camera position. It is an optional parameter, and if not provided, the default is an empty value.
Algorithm Steps
- The function begins by checking if there is at least one input argument. If there is, and it is not empty, it assigns this value to
p
.
- If
p
is empty, the function uses ginput(1)
to allow the user to select a point on the current figure. It then uses select3d
to get the 3D coordinates of the selected point and assigns this to p
.
- The function sets the camera position of the current axes (
gca
) to the point p
using set(gca,'CameraPosition',p)
.
- It sets the camera view angle to 10 degrees using
set(gca,'CameraViewAngle',10)
.
- The projection type is set to 'orthographic' using
set(gca,'Projection','orthographic')
.
Algorithm explaination created using ChatGPT on 2025-08-18 22:18. (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