Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'd like to draw

Plot[Re@Sin[x+I*2], {x, -10, 10}]

as an epilog on

Plot3D[Re@Sin[x + I*y], {x, -10, 10}, {y, -10, 10}]

and position it at y=2.

What's intuitive to me doesn't work:

epilogData = Table[{x, 2, Re@Sin[x + 2*I]}, {x, -10, 10, 0.1}];

Plot3D[Re@Sin[x + I*y], {x, -10, 10}, {y, -10, 10}, 
 Epilog -> {Red, PointSize[Large], Point[epilogData]}]

Using

epilogData2D = Table[{x, Re@Sin[x + 2*I]}, {x, -10, 10, 0.1}];

will draws something, but not what i want (What's that anyway?).

I've also played with Inset and got no luck so far.

share|improve this question
1  
The function Make3d can be useful. –  b.gatessucks Oct 27 '12 at 15:57
add comment

2 Answers

up vote 4 down vote accepted

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

share|improve this answer
    
How to make the animation? –  Problemaniac Oct 27 '12 at 16:09
    
@MonkeyKing See update. –  VLC Oct 27 '12 at 16:33
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.