by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - 4Bar/Linkages
Introduced first in SolidGeometry 4.5, Creation date: 2019-02-13, Last change: 2025-09-14
See Also: center3Pose
[K,D,W]=KDWPosevariation(PS,[nk,nd,dw])
PS: | Pose to be searched using center3Pose | |
nk: | number if k variants; default is | |
nd: | number of d variants; default is 5 | |
dw: | degree resolution ; default is 15 |
K: | List for k values; default are 40. | |
D: | List for d values; default are 5 | |
W: | List for values; ; default are 24 for 15 degree |
PS=Posesample(7);
[K,D,W]=KDWPosevariation(PS); center3Pose(PS.A,PS.B,K,D,W);S=ans; whos S
hideingca('text'); hideingca('polygon');
The function KDWPosevariation generates three variant lists for use with the center3Pose function. It is part of the SG-Library and was introduced in SolidGeometry 4.5.
center3Pose.nk), d variants (nd), and degree resolution (dw) using the getfuncparams function. Default values are used if not provided.nk and nd are scalars or arrays. If they are scalars, set default values for nk and nd.nw) as 360 divided by dw.PS structure has a field CPLE. If not, create a default contour using PLsquare.BBofCPL and sofBB to get the size s.s(1) and s(2) to two significant figures, storing them in sk and sd respectively.K using a range from -d*sk to d*sk with nk steps.D using a range from -h*sd to h*sd with nd steps.W using a range from -pi to pi with nw steps, slightly adjusted to avoid overlap.To use the function, you can call it with a pose sample:
PS = Posesample(7); [K, D, W] = KDWPosevariation(PS); center3Pose(PS.A, PS.B, K, D, W); S = ans; whos S
This example demonstrates how to generate the variant lists and use them with center3Pose.