setcamzoom

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 5.2, Creation date: 2022-12-09, Last change: 2025-09-15

zoom by changing the camera view angle;

Description

This function belongs to a set of function useful for AIM lectures

See Also: setcamdistance , setcamtarget , setcamdirection

Example Illustration

 missing image of setcamzoom(zf)

Syntax

setcamzoom([zf])

Input Parameter

zf: zoom factor; default is 1

Examples


load AIM.mat; VM=V; [AM,as]=VMresize(VM,[0.5 0.5 0.5],vs); AM(:,230:256,:)=0;
SG=SGofVMisosurface(AM>1400,as);
SGfigure; SGplotalpha(SG,'w',0.5); rotate3dlight('off')
view(-30,30); setcamdistance(1000); setcamzoom(10);




Copyright 2022-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, setcamzoom, is part of a visualization library used for adjusting the camera view angle in a 3D plot. It is designed to work with other functions like setcamdistance, setcamtarget, and setcamdirection.

Input Parameters

Function Workflow

  1. The function setcamzoom is called with optional input parameters.
  2. The function getfuncparams is used to retrieve the zoom factor zf from the input arguments. If no input is provided, it defaults to 1.
  3. The function setcamdistance is then called with the zoom factor zf to adjust the camera view angle accordingly.

Example Usage

An example is provided in the comments to demonstrate how the function can be used in conjunction with other functions to manipulate a 3D plot:

load AIM.mat; 
VM=V; 
[AM,as]=VMresize(VM,[0.5 0.5 0.5],vs); 
AM(:,230:256,:)=0; 
SG=SGofVMisosurface(AM>1400,as); 
SGfigure; 
SGplotalpha(SG,'w',0.5); 
rotate3dlight('off')
view(-30,30); 
setcamdistance(1000); 
setcamzoom(10);

This example loads a dataset, processes it, and visualizes it using a series of functions, including setcamzoom to adjust the zoom level of the camera.

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