Services & Resources / Wolfram Forums / MathGroup Archive
-----

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: [mg86924] Re: Intersection of 2D Surfaces in 3D
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Wed, 26 Mar 2008 04:54:33 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <fsa5g4$adt$1@smc.vnet.net>

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.


Just a side note, but NSolve returns real and complex solutions. To get 
only the real roots, you could use DeleteCases as in

c1 = {x - (t^2 - 1), y - (s^3 + s - 4)};
c2 = {x - (s^2 + s + 5), y - (t^2 + 7 t - 2)};

NSolve[Join[c1, c2], {x, y}, {s, t}]

sol2d = DeleteCases[%, {rx_, ry_} /;
    Head@Last@rx === Complex || Head@Last@ry === Complex]

==> {{x -> 23.8213, y -> 57.6959}, {x -> 6.95079,
   y -> -13.7872}, {x -> 1.79728- 5.72439 \[ImaginaryI],
   y -> -14.1904 + 3.63314 \[ImaginaryI]}, {x ->
    1.79728+ 5.72439 \[ImaginaryI],
   y -> -14.1904 - 3.63314 \[ImaginaryI]}, {x -> -0.183302 +
     1.17396 \[ImaginaryI],
   y -> 6.23603+ 5.05059 \[ImaginaryI]}, {x -> -0.183302 -
     1.17396 \[ImaginaryI], y -> 6.23603- 5.05059 \[ImaginaryI]}}

==> {{x -> 23.8213, y -> 57.6959}, {x -> 6.95079, y -> -13.7872}}


> 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.

NSolve returns an empty list as solution whenever it cannot find any 
solution. If you are confident that a solution exists, you should check 
that you have entered the correct equations. For the given c3 and c4, it 
seems that the parameters t and s cannot be eliminated.

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}]

(* ==> {} Empty list, i.e. no solution *)

Eliminate[Thread[Equal[Join[c3, c4], 0]], {t, s}]

== > False

On the other hand, t and s can be eliminated from c1 ans c2:

Eliminate[Thread[Equal[Join[c1, c2], 0]], {t, s}]

==> 1263970226 x ==
   7211108146 - 477420376 y - 28270737 y^2 + 10027446 y^3 +
    564196 y^4 - 12565 y^5 &&
  68224 y + 110735 y^2 - 10210 y^3 - 1569 y^4 - 28 y^5 + y^6 ==
   10991228


Hope this helps,
-- 
Jean-Marc


  • Prev by Date: Re: Tagged list processing
  • Next by Date: Re: Mathlink: How do I pass arbitrary data from Mathematica to C?
  • Previous by thread: Re: Intersection of 2D Surfaces in 3D
  • Next by thread: Color Options for PlanarGraphPlot