MathGroup Archive 2000

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

Search the Archive

RE: tracing lines on surface-graphics

  • To: mathgroup at
  • Subject: [mg25600] RE: [mg25593] tracing lines on surface-graphics
  • From: "David Park" <djmp at>
  • Date: Wed, 11 Oct 2000 03:50:39 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Dear Alan,

Here is a sample f[x,y]:

f[x_, y_] := 1/(0.2 + (x/8)^2 + (y/8)^2)

Here is your curve on the surface. I have raised the curve slightly so it
won't intersect the surface.

curve[x_] := {x, 1 + x/2, f[x, 1 + x/2] + 0.02}

This is how to plot the two objects using the regular Mathematica plotting

g1 = First[
        Plot3D[Evaluate[f[x, y]], {x, -10, 10}, {y, -10, 10},
          PlotPoints -> 51, Mesh -> False, DisplayFunction -> Identity]]];

g2 = First[
      ParametricPlot3D[Evaluate[curve[x]], {x, -10, 10},
        DisplayFunction -> Identity]];

Show[Graphics3D[{g1, g2}, DisplayFunction -> $DisplayFunction]];

This is how to do it using the DrawingCube packages available at my web


	{Draw3D[Evaluate[f[x, y]], {x, -10, 10}, {y, -10, 10}, PlotPoints -> 51,
          Mesh -> False],
        ParametricDraw3D[Evaluate[curve[x]], {x, -10, 10}]}]];

David Park
djmp at

> -----Original Message-----
> From: Alan Wetherby [mailto:roommate222 at]
To: mathgroup at
> Hi - I can't find an obvious way to trace a line on a surface-graphics
> object. I've plotted f(x,y) and got the surface I want, and now I want
> to add a curve, say: x varies according to the plotted range, y=1+x/2,
> z=f(x,y) --so it lies on the surface I've plotted. I've turned the mesh
> off because it's too dense, given the number of points I'm plotting,
> but I want to add a couple of such lines - another option would be to
> trace every 20th mesh-line or something like that, but that doesn't
> seem to be possible either.
> Thanks for any help -- Alan

  • Prev by Date: ReplaceAll in Element[] Q
  • Next by Date: Re: tracing lines on surface-graphics
  • Previous by thread: tracing lines on surface-graphics
  • Next by thread: Re: tracing lines on surface-graphics