I had the same idea earlier, but i dropped it because my intuition was, that three quadratic equations are worse than three linear and one quadratic equation :-)
Since you brought this approach up again, i tried it now, but sympy does not seem to find a solution. You can check out my code here: http://pastebin.com/famnqkLC You wrote you expected sympy to find a solution for numeric coefficients, but i need a symbolic solution because i want to proceed further (by differentiating with respect so some of the parameters for optimization), and don't want a sympy.solve step in each optimization step. Any idea why my original approach "explodes" in regards of the resulting expressions? On Monday, June 13, 2016 at 12:48:30 AM UTC+2, Oscar wrote: > > On 11 June 2016 at 17:52, <[email protected] <javascript:>> wrote: > > > > Yes, exactly, its the linear bearings that can be at different locations > and > > force therefore the board to different positions, those are the ones > that i > > am interested in! > > Rather than thinking about x, y and theta think about the three pin > positions. Give them position vectors r1, r2 and r3. Each is > constrained by a linear bearing and so e.g. r1 = a1 + t1*b1 where a1 > and b1 are known vectors and t1 is the unknown line parameter. We have > then three unknown scalars t1, t2, and t3. Although we don't know r1, > r2, or r3 we do know their pairwise distances d12, d13 and d23. This > gives three equations e.g. |r1-r2|**2 = d12**2. Substitute for r1, r2 > and r3 into those and we get 3 bivariate quadratic equations for t1, > t2, and t3. I would expect that sympy can solve that quickly for > numeric coefficients (if you can give numeric values for a1, b1, d12, > etc.). > > In your example it's clear from symmetry that if phi is a solution > then so is phi+pi so you should expect to get multiple solutions here. > This method will also give upside down solutions that you may need to > prune. Presumably also you'll need to check the solutions for > consistency with the limits on the line bearings. > > -- > Oscar > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/f6c4030f-c4f6-46b0-9830-833c1314b23b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
