SGmodelMass

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SimMechanics
Introduced first in SolidGeometry 3.6, Creation date: 2017-03-17, Last change: 2025-09-14

creates a mass point including 2 frames



See Also: SGmodelLink , SGmodelJoint , SGmodelNode , SGmodelLink3 , SGmodelKeyhole , SGmodelLink1 , SGmodelLink2

Example Illustration

 missing image of SGmodelMass(R)

Syntax

SG=SGmodelMass([R])

Input Parameter

R: Radius

Output Parameter

SG: Solid geometry




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, SGmodelMass, is designed to create a mass point with two frames using the SG-Library. It is a part of the SIMMECHANICS INTERFACE and was developed by Tim Lueth.

Input Parameters

Output

Algorithm Steps

  1. Initialize the radius R to 1. If an argument is provided and is not empty, set R to the provided value.
  2. Create a sphere with radius R using the function SGsphere(R) and assign it to SG.
  3. Create a box with dimensions [R*2, R*2, R*2] using the function SGbox and assign it to SG.
  4. Set the color of the solid geometry SG to magenta ('m').
  5. Set the transformation of SG for frame 'B' using the function SGTset with an identity matrix and a zero translation vector.
  6. Set the transformation of SG for frame 'F' using the function SGTset with an identity matrix and a zero translation vector.
  7. If no output is expected (nargout==0), plot the solid geometry using SGfigure, set the title using titleofcaller, and view the plot from a specific angle using view(-30,30). Finally, plot the solid geometry with SGTplot(SG).
Algorithm explaination created using ChatGPT on 2025-08-18 22:36. (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