b****r 发帖数: 1272 | 1 As shown in figure: In 3D, Given 2 links attached end to end with lengths
L1 and L2 respectively, a point P1 that the first link starts at, and a
point P2 that you want the end of the 2nd link to be at, write a function
that finds the configurations of the links that put the 2nd link’s end at
point P2.
我的理解是这个function是(P1,P2,L1,L2),但是输出(link的configuration
)应该怎么表达呢? 我想分三种情况讨论:
1.if distance(P1,P2) > L1+L2 : 无解(不可能把线段L2放到P2点)
2.if distance(P1,P2) == L1+L2 : 有唯一解 (两个线段在一直线上,交点就是P1,P2
中点),这种情况functi | w***n 发帖数: 1084 | 2 Maybe the function can return the intersection point (P) between two
segments, such that:
|P-P1|==l1 and |P-P2|=l2,
which can be calculated from two quadratic equations with two unknowns. | l*f 发帖数: 218 | |
|