How to draw a 2D curve as epilog on a 3D surface plot?

Maybe it helps to use Mesh:

Plot3D[Re@Sin[x + I*y], {x, -10, 10}, {y, -10, 10}, 
  Mesh -> {{{0, None}}, {{2, {Red, Thick}}}}]

Plot3D with mesh

With a varying y:

frames = Table[
  Plot3D[Re@Sin[x + I*y], {x, -10, 10}, {y, -10, 10}, 
  Mesh -> {{{0, None}}, {{i, {Red, Thick}}}}], {i, -10, 10, .5}];
Export["animation.gif", frames]

enter image description here


Like this?

With[{y0 = 2}, 
     Show[Plot3D[Re@Sin[x + I*y], {x, -10, 10}, {y, -10, 10}], 
          Graphics3D[{AbsoluteThickness[4], 
                      First[Plot[Re@Sin[x + I y0], {x, -10, 10}]] /.
                      v : {__?NumericQ} :> Insert[v, y0, 2]}]]]

surface with marked line

The use of Mesh, as in VLC's answer, is much easier, tho.

Tags:

Plotting