Syntax
[SG,t]=SGofsmbFullModelSimulation(SGi,Ti,tm,t)
Input Parameter
SGi : | | List of Solid Geometries, result of smbFullModelSimulation |
Ti : | | List of HT Frames, result of smbFullModelSimulation |
tm : | | List of time points result of smbFullModelSimulation |
t : | | desired time |
Output Parameter
SG : | | Solid Geoemtry |
t : | | Exact time of simulation |
Examples
[~,BNi,SGi,Ti,tm]=smbFullModelSimulation(1);
SGofsmbFullModelSimulation(SGi,Ti,tm,0);
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
Algorithm (Workflow)
This function, SGofsmbFullModelSimulation
, is designed to return a solid geometry for a specified time value of a simulation. It is an extension of the smbFullModelSimulation
function.
Input Parameters
- SGi: A list of solid geometries, which is the result of the
smbFullModelSimulation
.
- Ti: A list of homogeneous transformation (HT) frames, also a result of the
smbFullModelSimulation
.
- tm: A list of time points from the
smbFullModelSimulation
.
- t: The desired time for which the solid geometry is to be returned.
Output Results
- SG: The solid geometry at the specified time.
- t: The exact time of the simulation that is closest to the desired time.
Algorithm Steps
- Calculate the absolute difference between each time point in
tm
and the desired time t
.
- Find the index
ti
of the minimum difference, which corresponds to the time point closest to t
.
- Initialize
SG
with SGi
and determine the number of geometries n
.
- For each geometry in
SGi
:
- Apply the transformation matrix from
Ti
at index ti
using the function SGtransT
.
- If no output arguments are specified:
- Print a message indicating the time of the mechanism's display.
- Call
SGfigure
to create a new figure and set the view angle.
- For each geometry, plot it using
SGplot
and adjust the lighting with setplotlight
.
Algorithm explaination created using ChatGPT on 2025-08-19 01:15. (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