KMplot

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Kinematics and Frames
Introduced first in SolidGeometry 2.1, Creation date: 2015-02-10, Last change: 2025-09-14

plots all parts of a kinematic model

Description

Outdated concept also used in VLFL_EXP11 and VLFL_EXP12 is not supported anymore

A kinematic model is a cell list {nx3} of the format {, , 4x4-Matrix}. The Solid geometry is a struct consisting of vertex list (VL) and facet list (FL) and a cell list of 4x4 Frame-matrices (T) and a cell list of Frame-name-strings (Tname).

See Also: KMchain , KMofSGs

Example Illustration

 missing image of KMplot (KM)

Syntax

KMplot(KM)

Input Parameter

KM: Kinematic model




Copyright 2015-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, KMplot, is designed to plot all parts of a kinematic model. The kinematic model is represented as a cell list with each entry containing solid geometry, a name, and a 4x4 transformation matrix.

Input Parameters

  • KM: The kinematic model, which is a structured cell list. Each element of the list includes:
    • Solid Geometry: A struct with a vertex list (VL) and a facet list (FL).
    • Name: A string representing the name of the solid geometry.
    • 4x4-Matrix: A transformation matrix for the geometry.
  • varargin: Optional parameters. The first optional parameter is the color for plotting, defaulting to 'r' (red) if not specified.

Algorithm Steps

  1. Initialize the color c to 'r'. If a color is provided as an additional argument, update c with this value.
  2. Determine the number of solid geometries in the kinematic model by evaluating length(KM.SG).
  3. Iterate over each solid geometry in the kinematic model:
    • For each solid geometry, check if the corresponding transformation matrix KM.BT{i} is not the identity matrix eye(4).
    • If the transformation matrix is not the identity matrix, call the function SGplot with the following parameters:
      • KM.SG{i}: The solid geometry to be plotted.
      • c: The color for plotting.
      • An empty array [] as a placeholder for additional parameters.
      • KM.BT{i}: The transformation matrix to apply to the solid geometry.

The function relies on the SGplot function to handle the actual plotting of each solid geometry, applying the specified transformation matrix and color.

Algorithm explaination created using ChatGPT on 2025-08-18 23:52. (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