Re: Intersection of 2D Surfaces in 3D

*To*: mathgroup at smc.vnet.net*Subject*: [mg86899] Re: [mg86892] Intersection of 2D Surfaces in 3D*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Wed, 26 Mar 2008 04:47:15 -0500 (EST)*References*: <200803250617.BAA10628@smc.vnet.net> <46E32647-0187-4DF7-B920-62BBF4E39C61@mimuw.edu.pl> <C3A823D9-8CDB-4137-A4E5-C8BC6FAF59BF@mimuw.edu.pl>

On 25 Mar 2008, at 08:53, Andrzej Kozlowski wrote: > > On 25 Mar 2008, at 08:11, Andrzej Kozlowski wrote: >> >> On 25 Mar 2008, at 07:17, Narasimham wrote: >>> Following is an example (slightly altered) given in intersection >>> of 2- >>> D curves with one real root. >>> >>> c1 = {x - (t^2 - 1), y - (s^3 + s - 4) }; >>> c2 = {x - (s^2 + s + 5), y - (t^2 + 7 t - 2) }; >>> >>> It uses NSolve[Join[c1, c2], {x, y}, {s, t}] for supplying real >>> roots >>> of 2D curves in 2D itself. >>> >>> Next, how to generalize further to Solve and find real intersection >>> curves of two parameter surfaces in 3-D by extending the same >>> Mathematica Join procedure? >>> >>> And how to Show the one parameter 3D space curve of intersection so >>> obtained ? The following attempt of course fails. >>> >>> c3 = {x - (t^2 - 1), y - (s^3 + s - 4), z - (t + s)}; >>> c4 = {x - (s^2 + s + 5), y - (t^2 + 7 t - 2),z -( t + s^2/2)}; >>> NSolve[Join[c3, c4], {x, y, z}, {t,s}]; >>> >>> FindRoot also was not successful. >>> >>> Regards, >>> Narasimham >>> >>> >> >> >> Your two surfaces do not interesect: >> >> In[58]:= GroebnerBasis[Join[c3, c4], {x, y, s, t}] >> Out[58]= {1} >> >> So what do you mena by "fails"? What would constitute a "success" >> here? >> >> Andrzek Kozlowski > > > Actually, it should have been > > In[60]:= GroebnerBasis[Join[c3, c4], {x, y, z}, {s, t}] > Out[60]= {1} > > But they still do not intersect. > > Andrzej I was too quick in replying both times. What this shows is not that the two surfaces do not intersect but only that you can's simultaneusly choose values of t and s which give a point of intersection. This is a rather different matter. If we want to find a point of intersection rather than a point of intersection which corresponds to the same values of the parameters, we have to treat the parameters as independent. One way to proceed is as follows: c3 = {x - (t^2 - 1), y - (s^3 + s - 4), z - (t + s)}; c4 = {x - (s^2 + s + 5), y - (t^2 + 7 t - 2), z - (t + s^2/2)}; g1 = GroebnerBasis[c3, {x, y, z}, {t, s}]; g2 = GroebnerBasis[c4, {x, y, z}, {t, s}]; g = GroebnerBasis[Join[g1, g2], {x, y, z}, MonomialOrder -> EliminationOrder]; {x^4 - 8*z*x^3 - 48*x^3 + 24*z^2*x^2 - 8*y*x^2 + 284*z*x^2 + 736*x^2 - 32*z^3*x - 560*z^2*x + 176*y*x + 32*y*z*x - 2848*z*x - 4068*x + 16*z^4 + 368*z^3 + 16*y^2 - 32*y*z^2 + 2756*z^2 - 564*y - 368*y*z + 7360*z + 7483, z^6 - 3*x*z^4 - z^4 - 2*y*z^3 - 8*z^3 + 3*x^2*z^2 + 6*x*z^2 + 4*z^2 - 24*x*z - 6*x*y*z - 8*y*z - 32*z - x^3 - 5*x^2 + y^2 - 8*x + 8*y + 12} Now, sols = NSolve[g == 0, {x, y, z}, WorkingPrecision -> 100]; During evaluation of In[11]:= NSolve::"infsolns" : "Infinite solution set has dimension at least 1 . Returning intersection of solutions with (28373 x)/30371-(85901 y)/60742+z == 1. I have supressed the solutions but we can check one of them: In[7]:= Chop[g1 /. First[sols]] Out[7]= {0} In[8]:= Chop[g2 /. First[sols]] Out[8]= {0} So we certianly do have solutions, even an infinte set of solutions, but none of them correspond to the same values of s and t. I am not sure if that is what you wanted or not. Andrzej Kozlowski

**References**:**Intersection of 2D Surfaces in 3D***From:*Narasimham <mathma18@hotmail.com>