From: David Wilkinson Subject: Re: Shareware Symbolic Math Date: Fri, 14 Jul 2000 20:40:53 +0100 Newsgroups: sci.math.symbolic Summary: [missing] Now you have explained the physical problem let me check that I have understood it. You have three fixed points Sa, Sb and Sc apparently in a 2-dimensional plane as only x and y are mentioned. There is a triangle abc in the plane with sides Lab, Lbc and Lca. The corners of the triangle are each connected to one of the fixed points; a to Sa by a rod of length LSa, b to Sb etc. Consider the side ab and the two links aSa and bSb. These form a 4-bar chain in kinematic terms with the fourth link being the fixed one SaSb. If you fix the angle of aSa to any reference direction then the positions of all links in this chain are fixed and a and b can easily be found. Try drawing it on a piece of paper to see this or making a simple model with cardboard links and pins. Since the triangle has a fixed geometry the point c is also fixed and can be found. Now the distance cSc can be found and will in general be wrong as the angle of aSa was chosen arbitrarily. If you then vary the angle of aSa you can find the locus of point c as it moves in the plane. This will in general be a loop but might even be a figure eight for the angle varying through 360 degrees. A circle defining a constant distance LSc from point Sc will either miss the loop giving no solutions or have a range of solutions including being tangent to or intersecting the loop. It could be tangential at one or two points. It could intersect at two or four points for a simple loop or figure eight. Combinations of these give either 0, 1, 2, 3 or 4 solutions depending on the lengths of the links. Either way you only have to solve for one variable, instead of six. Vary the angle of link aSa as independent variable and find the distance of point c from Sc. Use some iteration method to find the values of the angle for which this distance equals LSc. Finding them all probably means varying the angle through 360 degrees If you can't see this at once try assigning some lengths to the links and draw some diagrams or do some modelling. It is a simple exercise in the kinematics of machines. If the points Sa, Sb and Sc move then for each set of positions there will be a new set of solutions which you can find as above. However if you start at one solution and move the points slightly the new solution will be very similar to the old one so you will only have to solve for that one and not for the others. In general if you start with the mechanism in one position there is no way it can physically get to any of the other solutions without taking it to pieces and reassembling it in the new position. Hope this helps. It is not a good idea to try to solve 6 simultaneous non-linear equations analytically when you can solve for one variable iteratively. It is usually the case that where a problem seems intractable you need to try another approach. In article <396ED2ED.4812CDD3@tin.it>, Triangolo writes > > >David Wilkinson wrote: > >> I managed to get a solution to the slightly more complex >> >> (xb-xa)^2 + (ya)^2 = Lab^2 >> (xc-xa)^2 + (yc-ya)^2 = Lac^2 >> >> by using the submatrix function to find the 4 elements of the solution >> matrix one at a time >> >> submatrix(Find(xa,ya),i,i,j,j) ->, i = 1,2, j = 1,2 >> >> but each expression for xa and ya was 4 screens wide. The solutions are >> presumably complex when the circles do not intersect as there is a >> square root in them. >> >> I tend to think that the analytic solution is often worse than the >> original problem as it is unlikely you would want to do further algebra >> on the solutions writing down all the terms. It seems more plausible to >> carry the answer as [xa,ya] = [A] where [A] is a 2x2 matrix of real or >> complex terms and evaluate it at the end numerically with actual values >> of xb, yb, xc & yc. >> >> I am sure MathCad is right that the symbolic solution for your >> 6-equation set is too large to be worth displaying. If you really want >> the answer in a particular case, substitute numerical values for all the >> constants and then solve for the numerical values of xa, ya, etc. >> >> In my experience in a similar context, when MathCad refuses to produce >> symbolic integrals and one does them with Maple the result will often >> cover of the order of 7 complete screens and therefore be almost >> useless. If you want the numerical answer it is much quicker to do a >> numerical integration of the original integrand than it is to evaluate >> the symbolic integral from Maple by substituting numbers in it. >> >> I should disclaim any commercial connection with MathCad, other than >> buying their software, and any particular expertise in using it, being >> merely a casual user for engineering problems. For further information >> try MathCad support at Adept Scientific. >> >> In article <396C238B.6E9CB1D0@tin.it>, Triangolo >> writes >> > >> > >> >David Wilkinson wrote: >> > >> >> Have you tried MathCad? It is a lot cheaper, especially the standard >> >> version that may include all you need, and is much easier to use. >> >> >> >> In article , Charles Weaver > >> eaver@post.harvard.edu> writes >> >> >Recently I had occasion to look for symbolic algebra and calculus >> >> >programs for the PC. I was appalled at the cost of Mathematica and >> >> >Maple. Are there decent shareware symbolic math programs around? >> >> >> >> -- >> >> David Wilkinson >> > >> >I'm not sure that mathcad is a good idea >> >I try to solve this system but mathcad said that >> >Result is too large to display >> > >> >Given >> >(Xa - Xb)^2 + (Ya - Yb)^2 = Lab^2 >> > (Xa - Xc)^2 + (Ya - Yc)^2 = Lac^2 sides of triangle >> > (Xc - Xb)^2 + (Yc - Yb)^2 = Lbc^2 >> > (Xa - XSa)^2 + (Ya - YSa)^2 = LSa^2 >> > (Xb - XSb)^2 + (Yb - YSb)^2 = LSb^2 External segment connect >> > (Xc - XSc)^2 + (Yc - YSc)^2 = LSc^2 to any vertex >> >Find(xa,ya,xb,yb,xc,yc) >> > >> > >> >So I try with two circle intersection >> >Given >> >(xb-xa)^2 + (yb-ya)^2 = lab^2 >> >(xc-xa)^2 + (yc-ya)^2 = lac^2 >> >Find (xa,ya) >> >but mathcad said : Result is too large to display >> >................... >> > >> >Finally I try with two circle intersection >> >but with one at zero origin >> >Given >> >xa^2 + ya^2 = lab^2 >> >(xc-xa)^2 + (yc-ya)^2 = lac^2 >> >Find (xa,ya) >> >and now mathcad work >> > >> >Do you know why ? >> >Best regards >> >Triangolo >> > >> >> -- >> David Wilkinson > >Thanks David, >but I have a "real" problem. >I need to make a program for simulate the movements of >a mechanical triangle connect to 3 moving parts by 3 arms >connected to the 3 vertexs, so i need to find real times >results (25 times every second) of vertex position for >draw the picture on the screen. I just made a routine >with iterative approximation algoritm but in not enought >fast with accuracy results. >Today i have also try MuPad-pro and it seem just little >better that MathCad (give solution at circle intersection) >for symbolic equation, but not enought for my problem. >I don't know now which way take for solve this and >futures problem for simulate mechanical movements >with some constrains by calculation on the computer. >Do you can help me ? > >Best regards >Triangolo > -- David Wilkinson