Syntax
[PS,e,o]=Posenorm(PS,[l,ka])
Input Parameter
PS : | | Pose.A and Pose.B |
l : | | desired length; default is 1 |
ka : | | starting offset relative to A |
Output Parameter
PS : | | Adjusted Pose.A and Pose.B |
e : | | direction vector |
o : | | orthogonal vector |
Examples
Posenorm(Posesample(7))
Posenorm(Posesample(7),10)
Posenorm(Posesample(7),10,-10)
[a,b,c]=Posenorm(PS,10)
Copyright 2019-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, Posenorm
, is designed to adjust the length of pose vectors to a common length and shift the start point. It is part of the SolidGeometry library and was introduced in version 4.4.
Input Parameters
- PS: A structure containing two fields,
Pose.A
and Pose.B
, which represent the start and end points of pose vectors.
- l: The desired length of the pose vectors. The default value is 1.
- ka: The starting offset relative to
A
. The default value is 0.
Output Results
- PS: The adjusted pose vectors with updated
Pose.A
and Pose.B
.
- e: The direction vector of each pose.
- o: The orthogonal vector to each direction vector.
Algorithm Steps
- Retrieve the desired length
l
and starting offset ka
from the input parameters using the getfuncparams
function.
- Determine the number of pose vectors
n
by checking the size of PS.A
.
- Initialize matrices
e
and o
to store direction and orthogonal vectors, respectively.
- For each pose vector:
- Calculate the vector
v
from PS.A
to PS.B
.
- Normalize
v
to get the direction vector e
.
- Compute the orthogonal vector
o
by rotating e
90 degrees.
- Adjust the start point
PS.A
by adding ka
times the direction vector e
.
- Set the end point
PS.B
to be l
times the direction vector e
from the new start point.
- If no output arguments are specified, plot the pose using
Poseplot
and print the adjusted pose vectors to the command line if the caller is a MATLAB script.
Algorithm explaination created using ChatGPT on 2025-08-19 08:03. (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