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

MathGroup Archive 2009

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

Search the Archive

Re: Slicing a surface

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97386] Re: Slicing a surface
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Thu, 12 Mar 2009 02:19:23 -0500 (EST)
  • References: <gp7vrq$1c7$1@smc.vnet.net>

Perhaps you could use Solve. Example:

some x[s,t],y[s,t],z[s,t] functions as you described:

p1 = ParametricPlot3D[{s + t^2, 3 s t,  t - s }, {s, -1, 1}, {t, -1,
1}]

finding a solution for a fixed z:

In[156]:= Assuming[ {x \[Element] Reals, y \[Element] Reals,
  z \[Element] Reals},
 Solve[{x == s + t^2, y == 3 s t, z == t - s, z == 0}, {x},=
 {s, t}]]

Out[156]= {{x -> 1/3 (-Sqrt[3] Sqrt[y] + y)}, {x ->
   1/3 (Sqrt[3] Sqrt[y] + y)}}

Plot the contour together with the surface:

p2 = ParametricPlot3D[{1/3 (-Sqrt[3] Sqrt[y] + y), y, 0}, {y, -3, 3},
   PlotStyle -> Red];
p3 = ParametricPlot3D[{1/3 (Sqrt[3] Sqrt[y] + y), y, 0}, {y, -3, 3},
  PlotStyle -> Red]
Show[{p3, p2, p1}, PlotRange -> All]

and now in 2D:

Plot[{1/3 (Sqrt[3] Sqrt[y] + y), -(1/3) (Sqrt[3] Sqrt[y] + y)}, {y,
-3, 3}]

Cheers -- Sjoerd

On Mar 11, 11:22 am, SotonJames <james.fre... at soton.ac.uk> wrote:
> Hi,
>
> I've generated a surface in Mathematica 6 by solving some simultaneous eq=
uations for three variables (x[s,t], y[s,t] and z[s,t]) and parametric plot=
ting the variables against each other, with s and t the surface parameters.=
 I want to get a one-dimensional cross-section of the surface, ie a slice t=
hrough constant z, but I don't know how to do this. Taking a constant s or =
t is the best I can do, but isn't nearly the same. I'd like the line cross-=
section to be displayed as a flat 2D graph, rather than be embedded in the =
original 3D space.
>
> Any suggestions on how to do this?
>
> Many thanks in advance,
>
> James



  • Prev by Date: Re: Share symbols among packages
  • Next by Date: Re: Re: Mathematica 7.0.1.0 and some General Comments
  • Previous by thread: Slicing a surface
  • Next by thread: Re: Slicing a surface