MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Intersection of 2D Surfaces in 3D

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

On 25 Mar 2008, at 12:05, Andrzej Kozlowski wrote:
>
> 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
>
>
>

I forgot one more thing. You can find the values of the parameters for  
the first solution found above as follows:

NSolve[(c3 /. First[sols]) == 0, {s, t}]
{{s ->  
3.549649428657260104932443969260755059663642737812956488470786773966849\
2775489851837406342999953561,
   t ->  
7.562957404816345688590727527777101428342711747001146114563829849367947\
862694294555522868386703745}}

NSolve[(c4 /. First[sols]) == 0, {s, t}]
{{s -> 6.672748755328489446097987376875561309724427484\

     152028039873269711214036255449691579354919898061403784\

     966277486576522`97.82414841138389,
      t -> -11.150181142395346761511766038113142308533135\

      511733012971341431406359825329246519556023310261923416\

      0390610285182674971`97.82414841138389}}

In general the algebraic surface that you get by eliminating the  
parameters is may contian the original parametric one, so one would  
need to actually find the corresponding parameters to determine if the  
solutions really lie on the parametric surfaces. In addition, one has  
to decide whehter one is looking only for real solutions or also for  
complex ones.

Andrzej Kozlowski



  • Prev by Date: Re: Funny behaviour of ClipboardNotebook[] (Q: How to copy programmatically?)
  • Next by Date: Re: smallest fraction
  • Previous by thread: Re: Intersection of 2D Surfaces in 3D
  • Next by thread: Re: Intersection of 2D Surfaces in 3D