Syntax
B1=B1ofA1(A1,L2,[w])
Input Parameter
A1 : | | Attachment Point 1 relative to Origin/Pose center |
L2 : | | Length of coupler |
w : | | angle of Pose to achieve |
Output Parameter
B1 : | | Position of Attachment Point 2 |
Examples
B1ofA1([-40 -40],100)
A1=[-40 -40]; B1ofA1(A1,100,pi/30); B1=ans;
KDWofXY(A1,B1);
[K,D,W]=KDWofXY(A1,B1)
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 calculates the position of a second attachment point (B1) based on a first attachment point (A1), a given length (L2), and an optional angle (w).
Input Parameters
- A1: A vector representing the first attachment point relative to the origin or pose center.
- L2: A scalar representing the length of the coupler.
- w: An optional angle in radians for the pose to achieve. If not provided, it defaults to 0.
Output
- B1: A vector representing the position of the second attachment point.
Algorithm Steps
- Retrieve the angle
w
from the input parameters using getfuncparams
. If not provided, default to 0.
- Negate the angle
w
to adjust the direction.
- Initialize the origin point
P0
as [0 0]
.
- Calculate the position of the second attachment point
B1
using the formula:
B1 = L2 * [cos(w) sin(w)] + A1
- If no output is requested (
nargout == 0
), visualize the result:
- Call
SGfigure
to create a new figure.
- Use
PosefourbarCPLE
to plot the four-bar linkage with points A1
and B1
.
- Annotate the plot with the angle
w
converted to degrees.
Algorithm explaination created using ChatGPT on 2025-08-19 00:18. (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