See thread in p.advanced-users.
I tried sin(x) = T and cos(x) = U, but it did not converge on a
solution. My next plan was to convert the original equation to a
function and write a solver, and once I got the algorithm to choose
proper intervals, it worked beautifully.
For the test cases in these images, I plugged the coordinates of the
maroon dot into the algorithm, and flexed the lamp according to the
angle returned. The graph on the right is of the function: the x-axis
goes from -pi to +pi/2, and the black dot is the calculated angle.
(This angle is the negative of the angle in the p.a-u thread.) The
algorithm automatically determined that the bottom test case has no
Thanks again, Kurtz le pirate!
Post a reply to this message
Download 'test_lamp_flex-pbi.png' (67 KB)
Preview of image 'test_lamp_flex-pbi.png'