rview

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 1.0, Creation date: 2012-10-31, Last change: 2025-08-18

Restores parameters of the current figure/View

Description

After adujsting a figure and a view direction call sview.
To restore the same parameters for a new figure just call rview.

See Also: sview , Tofcam , Tofview

Example Illustration

 missing image of rview

Syntax

rview

Examples

sview and rview can replace show



Copyright 2012-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 algorithm is designed to restore the parameters of a current figure/view in MATLAB. It relies on a global variable sview_V that stores the view parameters set by a previous function call, presumably sview.

Input Parameters

Global Variable

Algorithm Steps

  1. Check if sview_V is not empty. This indicates that the view parameters have been previously set using sview.
  2. If sview_V is not empty:
    • Use the view function to set the azimuth and elevation of the current axes to sview_V.a and sview_V.e, respectively.
    • Set the position of the current figure using set(gcf, 'Position', sview_V.get.Position).
    • Set the camera view angle, target, and position of the current axes using set(gca, ...) with the respective fields from sview_V.
    • Call VLFLshow, which is likely a custom function to update the view or enable interactive rotation (as suggested by the commented rotate3d).
  3. If sview_V is empty:
    • Check if there are any input arguments (nargin > 0). If there are, the function does nothing further.
    • If there are no input arguments, display a warning message indicating that the view has not been defined by sview yet.

The function is part of a visualization library and is used to restore a previously saved view configuration for MATLAB figures.

Algorithm explaination created using ChatGPT on 2025-08-18 23:33. (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