B1ofA1

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Kinematics and Frames
Introduced first in SolidGeometry 5.1, Creation date: 2021-12-04, Last change: 2025-09-15

returns a second attachment point from a 1st Attachment point, distance and angle



See Also: KDWofXY , KDWofPoseattachments , PosefourbarCPLE , TofPoseattachmentpoints , KDWPoseinsideCPL , KDWPosevariation

Example Illustration

 missing image of B1ofA1(A1,L2,w)

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

Output

Algorithm Steps

  1. Retrieve the angle w from the input parameters using getfuncparams. If not provided, default to 0.
  2. Negate the angle w to adjust the direction.
  3. Initialize the origin point P0 as [0 0].
  4. Calculate the position of the second attachment point B1 using the formula:
    B1 = L2 * [cos(w) sin(w)] + A1
  5. 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