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.

Just purchased the Presentations package. First sketched this region:

<< Presentations`

Draw2D[
 {Opacity[0.6],
  ComplexRegionDraw[0 <= Re[z] <= 1, {z, -2 - 2 I, 2 + 2 I}]},
 Frame -> True,
 Axes -> True,
 PlotRange -> 2,
 FrameLabel -> {Re, Im},
 PlotLabel -> z,
 ImageSize -> 300
 ]

And I got the image I wanted.

today

Next, I want to sketch the image of this region under the exponential function $w=e^z$. I tried this:

Draw2D[
 {Opacity[0.6],
  ComplexRegionDraw[Exp[z], {z, -2 I, 1 + 2 I}]},
 Frame -> True,
 Axes -> True,
 PlotRange -> 2,
 FrameLabel -> {Re, Im},
 PlotLabel -> z,
 ImageSize -> 300
 ]

But I got a blank image. Any suggestions?

Looks like I might have an idea.

f[z_] := Exp[z]

Draw2D[
 {Opacity[0.6],
  ComplexRegionDraw[0 <= Re[z] <= 1, {z, -2 - 2 I, 1 + 2 I},
    PlotPoints -> 30] // ComplexMap[f]},
 Frame -> True,
 Axes -> True,
 PlotRange -> All,
 FrameLabel -> {Re, Im},
 PlotLabel -> z,
 ImageSize -> 300
 ]

And the resulting image:

today2

Of course, what I really wanted was the image of the the strip with $0\le Re[z]\le1$ and $\infty\le Im[z]\le \infty$.

Draw2D[
 {Opacity[0.6],
  ComplexRegionDraw[0 <= Re[z] <= 1, {z, 0, 1 + 2 Pi I},
    PlotPoints -> 30] // ComplexMap[f]},
 Frame -> True,
 Axes -> True,
 PlotRange -> All,
 FrameLabel -> {Re, Im},
 PlotLabel -> z,
 ImageSize -> 300
 ]

And the resulting image.

today3

share|improve this question
1  
I don't have the package (heard only good things about it!) but from looking at your syntax my guess would be: the first argument in ComplexRegionDraw[Exp[z]... has to be a boolean condition, not a complex function. Therefore, you should replace that by Abs[Exp[z]]<1, or Re[Exp[z]]>0, or some condition along those lines. –  Jens Jan 19 '13 at 5:33

1 Answer 1

I think you really want $-\pi\leq \Im(z) \leq \pi$. Then let the Presentations function ComplexMap do the work for you!

<< Presentations`

strip = ComplexRegionDraw[0 <= Re[z] <= 1, {z, -2 - Pi I, 2 + 4 Pi I}];
domain = Draw2D[{Opacity[0.6], strip}, 
           Frame->True, Axes->True, PlotRange->2, FrameLabel->{Re, Im}, PlotLabel->z];
image = Draw2D[{Opacity[0.6], strip // ComplexMap[Exp]}, 
           Frame->True, Axes->True,PlotRange->4, FrameLabel->{Re, Im}, PlotLabel->w];
GraphicsRow[{domain, image}, PlotLabel -> "Mapping vertical strip by exp"]

Note the use of ComplexMap[Exp] in the definition of image; that's how the image is found.

Mathematica graphics

share|improve this answer
    
Nice! And it shows me how to write good code. Thanks. –  David Jan 19 '13 at 17:10
    
Question: I notice a lot of people paste their Row image. How do you copy that image so that you can import it to this site? –  David Jan 19 '13 at 17:50
    
I finding this a very helpful introduction to the Complex part of the Presentations package: mathematica-journal.com/data/uploads/2011/10/EisenbergPark.pdf –  David Jan 19 '13 at 17:58
    
@David, for the row image, first I had downloaded and installed the "SE Uploader" palette from this site -- search the "meta" items from the link at the top of this page for the palette -- then highlighted the entire graphic row, clicked a button on that palette to upload the image (which also places the URL of the upload onto the clipboard), then pasted that URL into my answer here; the image appears! –  murray Jan 19 '13 at 19:05
    
Of course I have been using the ComplexGraphics part of Presentations to handle complex regions and more general plotting about complex functions. But I even find it expedient to use the ComplexGraphics routines to construct plane figures having nothing explicit to do with complex numbers. Thus if I have to use a bunch of {x, y} points, I find it often easier to write them in x + I y form and use that form in the graphics code. –  murray Jan 19 '13 at 19:08

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.