colofPose

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - 4Bar/Linkages
Introduced first in SolidGeometry 5.1, Creation date: 2022-01-29, Last change: 2025-09-15

returs colors from Pose and 4Bar standard colors

Description

4Bar link/area desciption letters and colors:
C Crank is blue
S Swing is cyan
E Effector is green
G Ground is yellow
4bar area colors"
B Background is karbon
M Assembly are is blue
W Restricted are is red


See Also: nofcolmap , colofn

Example Illustration

 missing image of colofPose(cs4Bar)

Syntax

cs=colofPose(cs4Bar)

Input Parameter

cs4Bar: color string using 4Bar link/area desciption letters such as 'E--' for effector dashed

Output Parameter

cs: that uses standard Matlab colors such as 'r--'

Examples


cla; CPSplot(PLcircle(10),colofPose('W')); shg





Copyright 2022-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)

The function colofPose is designed to convert a color string that uses specific 4Bar link/area description letters into standard MATLAB color codes. This function is part of the SG-Library and was introduced in SolidGeometry 5.1.

Input Parameters

Output Results

Algorithm Explanation

The function colofPose uses the strrepn function to replace specific characters in the input string cs4Bar with corresponding MATLAB color codes. The replacements are as follows:

The function does not contain any switch conditions, so the explanation is limited to the character replacements performed by strrepn.

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