Syntax
R12o=R12ofCPL(CPL)
Input Parameter
CPL : | | List of Points for A0, B0, B1, A1 |
Output Parameter
R12o : | | [Outer and Inner radius] for links |
Examples
R12ofCPL(CPLfourbarcontour(100,20,100,50)) % CAll with length
Copyright 2021-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, R12ofCPL, is designed to calculate standardized link and joint dimensions for a four-bar linkage system. It is part of the SolidGeometry library and is used primarily for creating visual representations and animations of linkage systems.
Input Parameters
- CPL: A list of points representing the positions A0, B0, B1, and A1 in a four-bar linkage system.
Output Results
- R12o: An array containing the outer and inner radii for the links in the linkage system.
Algorithm Steps
- Calculate the total distance of the points in CPL using the function
VLdistance
and store it in variable x
.
- Round the value of
x
divided by 100 to the nearest integer.
- Calculate the outer radius as the maximum of 2 and
x
.
- Calculate the inner radius as the maximum of 1 and two-thirds of
x
.
- Store the calculated radii in the output variable
R12o
.
- If no output is requested (i.e.,
nargout == 0
), proceed to visualize the linkage system:
- Create a figure using
SGfigure
.
- Generate convex hull outlines for the circles centered at the points in CPL using the calculated radii.
- Plot these outlines using
CPSplot
with different colors for each segment.
Example Usage
The function can be called with a set of points representing a four-bar linkage contour, such as R12ofCPL(CPLfourbarcontour(100,20,100,50))
.
Algorithm explaination created using ChatGPT on 2025-08-19 00:19. (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