Tofcam

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

returns HT matrix of camera and target for a given camera point, target point, and camera up vector



See Also: TofPcam , Tofgca , camplot , camset , Tofgca , tcamera , camofT

Example Illustration

 missing image of Tofcam(pc,pt,cup)

Syntax

[T,Tt,va,ax]=Tofcam(pc,pt,cup)

Input Parameter

pc: point of camera; default is campos
pt: point of target; default is camtarget
cup: cup direction ; rough; default is camup

Output Parameter

T: Transformation of camera
Tt: Transformation of target
va: current camera angle
ax: current axis values

Examples


SGfigure; SGplot(SGsample(1)); pause; Tofcam
T=Tofcam; R=T(1:3,1:3)', planeaxis=max(abs(R(1:3,3)))~=abs(R(1:3,3))', % planar main axis




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

Last html export of this page out of FM database by TL: 2025-09-21