SGrotate
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Kinematics and Frames
Introduced first in SolidGeometry 4.1, Creation date: 2017-08-06, Last change: 2025-09-14
returns a solid rotated around the center of the solid
Description
Use 'P' to rotate around the center of the solid
Cent ist a 4x4 HT matrix or
"0" = Rotation around the origin
"P" = rotation around the center of the SG
"R" = rotation around the origin using the eigenaxis of SG
"T" = rotation around the center of the solid using the eigenaxis of SG
See Also: SGtransT
, SGTrotate
Example Illustration
Syntax
SGN=SGrotate(SG,[ax,val,Cent])
Input Parameter
SG: | | Solid Geoemtry |
ax: | | rotation axis sequence; 'xyz' or 'x', 'z','e', or 'r' for random with a value, 'e'=centered |
val: | | values for rotation; same as ax |
Cent: | | T or "0" or "P", or "R" or "T" |
Output Parameter
SGN: | | Spatial rotated Solid including the frames |
Examples
SGrotate(SGtransP(SGbox,[30 0 0]),'y',pi/2);
SGrotate(SGtransP(SGbox,[30 0 0]),'yz',[pi/2,pi/4]);
SGrotate(SGtransP(SGbox,[30 0 0]),'r');
SGrotate(SGtransP(SGbox,[30 0 0]),'z',[pi/3],'0'); zoomVL(SGbox(100)); view(-30,30);
SGrotate(SGtransP(SGbox,[30 0 0]),'z',[pi/3],'C'); zoomVL(SGbox(100)); view(-30,30);
SGrotate(SGtransP(SGbox,[30 0 0]),'z',[pi/3],'R'); zoomVL(SGbox(100)); view(-30,30);
SGrotate(SGtransP(SGbox,[30 0 0]),'z',[pi/3],'T'); zoomVL(SGbox(100)); view(-30,30);
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