MathGroup Archive 2004

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

Search the Archive

Re: Intersection of two surfaces in 3D

Narasimham wrote:
> There are threads currently on sci.math  on this topic. How do we find
> space intersection curve of two  parameterized surfaces? One needs to
> solve for two unknown functions f1(t1,t2)=0 and f2(s1,s2)=0 to print
> out/output coordinates of intersection. I do believe it is within the
> capability of Mathematica, at least when surfaces are algebraically
> generatable. An example/approach considered is:
> Clear[x,y,z,t1,t2,s1,s2];
> x1=4*t2* Cos[t1]; y1=4Sin[t1]; z1=3t2;
> x2=s2 Sin[s1];y2=s2 Cos[s1];z2=(s2^2/4);
> pp1=ParametricPlot3D[{x1,y1,z1},{t1,0,2 Pi},{t2,0,1}];
> pp2=ParametricPlot3D[{x2,y2,z2},{s1,0,2 Pi},{s2,0,4}];
> Show[pp1,pp2];
> S1={x-x1,y-y1,z-z1}; S2={x-x2,y-y2,z-z2};
> NSolve[Join[S1,S2],{x,y,z},{t1,t2,s1,s2}];

I'm not sure exactly what you want but I'll show a couple of 
computations that might be of use in the algebraic case (that is, when 
everything can be cast in the form of rational functions in some set of 

We start with the system below. I took the liberty of algebraicizing the 
trigs and also of appending 1's for the parameters of the first surface 
and 2's for parameters for the second surface. This has the perhaps 
unfortunate effect of changing the locations of some of your parameters.

polys = {x-4*s1*ct1,  y-4*st1, z-3*s1,
   x-s2*st2, y-s2*ct2,z-s2^2/4,
   ct1^2+st1^1-1, ct2^2+st2^1-1};

To find a "nice" implicit form of the intersection we compute a Gorebner 
basis in the space variables {x,y,z}, eliminating all parameters.

InputForm[gbvars = GroebnerBasis[polys, {x,y,z}, {s1,s2,ct1,st1,ct2,st2}]]

{9*y^4 - 72*y^2*z + 144*z^2 - 64*z^3 + 16*y*z^3, 9*x^2 -
   16*z^2 + 4*y*z^2}

If instead you would like parameters for the intersection curve you can 
eliminate the space variables and the parameters for one surface.

InputForm[gbparams = GroebnerBasis[polys, {s1,ct1,st1},

{-1 + ct1^2 + st1, 9*s1^2 - 12*s1^3 + 12*s1^3*st1 -
   24*s1*st1^2 + 16*st1^4}

There are other techniques that apply to nonalgebraic parametrizations 
(and to algebraic). For example one might attempt to track the 
intersection curve via an ODE (or better still, DAE) system. It's a bit 
of work to do by hand. You might want to look at a MathSource package by 
Steve Wilkinson:

Daniel Lichtblau
Wolfram Research

  • Prev by Date: Re: Iteration of Initial Conditions for required Boundary Value with NDSolve
  • Next by Date: Re: Intersection of two surfaces in 3D
  • Previous by thread: Intersection of two surfaces in 3D
  • Next by thread: Re: Intersection of two surfaces in 3D