SGtransR

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Spatial Relations
Introduced first in SolidGeometry 1.7, Creation date: 2014-11-23, Last change: 2025-09-14

rotates a solid geometry (or a list) relative using a rotation matrix

Description

The function simply uses VLtransR for the transformation. The function supports different calling structures. SGtransR supports also the T frame concept.
1. N=SGtransR (A,R)
2. Nlist=SGtransR ({A,B,C},R)
3. [NA,NB,NC]=SGtransR ({A,B,C},R)

See Also: SGtrans , SGtrans0 , SGtrans1 , SGtransP , SGtransrelSG , SGtransrelT , SGtransT

Example Illustration

 missing image of SGtransR(SG,R)

Syntax

[SG1,varargout]=SGtransR(SG,R)

Input Parameter

SG: Solid geometry (.VL/.FL) or a cell list of SG
R: Point as column vector (1x3)

Output Parameter

[G,R) - rotates a solid geometry (or a list) relative using a rotation matrix % (by Tim Lueth, SG-Lib, 2014-NOV-23 as class: SPATIAL RELATIONS) % % The fnctn simply uses VLtransR for the transformation. The fnctn supports % different calling structures. SGtransR supports also the T frame concept. % 1. N=SGtransR (A,R) % 2. Nlist=SGtransR ({A,B,C},R) % 3. [NA,NB,NC]=SGtransR ({A,B,C},R) (Status of: 2025-08-18) % % Introduced first in SolidGeometry 1.7 % % See also: SGtrans, SGtrans0, SGtrans1, SGtransP, SGtransrelSG, SGtransrelT, % SGtransT % % [SG1,varargout]=SGtransR(SG,R) % === INPUT PARAMETERS === % SG: Solid geometry (.VL/.FL) or a cell list of SG % R: Point as column vector (1x3) % === OUTPUT RESULTS ====== % [G1,varargout]=SGtransR(SG,R) % % if isempty(SG)]: First output solid geometry % [G1,varargout]=SGtransR(SG,R) % % if isempty(SG)]: optional more output arguments % % EXAMPLE: Show the movement in Z % A=SGbox([30,20,10])]: First output solid geometry
[G,R) - rotates a solid geometry (or a list) relative using a rotation matrix % (by Tim Lueth, SG-Lib, 2014-NOV-23 as class: SPATIAL RELATIONS) % % The fnctn simply uses VLtransR for the transformation. The fnctn supports % different calling structures. SGtransR supports also the T frame concept. % 1. N=SGtransR (A,R) % 2. Nlist=SGtransR ({A,B,C},R) % 3. [NA,NB,NC]=SGtransR ({A,B,C},R) (Status of: 2025-08-18) % % Introduced first in SolidGeometry 1.7 % % See also: SGtrans, SGtrans0, SGtrans1, SGtransP, SGtransrelSG, SGtransrelT, % SGtransT % % [SG1,varargout]=SGtransR(SG,R) % === INPUT PARAMETERS === % SG: Solid geometry (.VL/.FL) or a cell list of SG % R: Point as column vector (1x3) % === OUTPUT RESULTS ====== % [G1,varargout]=SGtransR(SG,R) % % if isempty(SG)]: First output solid geometry % [G1,varargout]=SGtransR(SG,R) % % if isempty(SG)]: optional more output arguments % % EXAMPLE: Show the movement in Z % A=SGbox([30,20,10])]: optional more output arguments

Examples

Show the movement in Z
A=SGbox([30,20,10]);
A=SGtransR (A,rot(pi/6,0,0)); SGplot (A); show; pause (1);
B=SGbox([20,20,10]);
[A,B]=SGtransR ({A,B},rot(pi/6,0,0)); SGplot ({A,B},'b'); show
L=SGtransR ({A,B},rot(pi/6,0,0)), SGplot (L,'b'); show




Copyright 2014-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