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.

Given $S \subseteq \mathbb{C}$ I am trying to plot $f(S)$ for given complex valued function $f$

Looking at other answers on this site for similar questions, I came up with this

f = Function[z, 1/Conjugate[z]];

(*Plot limit parameters*)
plimit = 1;
space = 2;
plrange = {{Re[f[-plimit]] - space, Re[f[plimit]] + space},
           {Im[f[-plimit]] - space, Im[f[plimit]] + space}}

ParametricPlot[
  Evaluate@({Re[f[z]], Im[f[z]]}*Boole[Abs[z] < 1] /. z -> x + I*y),
  {x, -plimit, plimit},
  {y, -plimit, plimit}, (*Indicates the rectablge from which the points satisfying Boole[..]==1 will be picked.*)
  PlotRange -> plrange
]

The result of this command is

enter image description here

My question is why are there two different colors in this image? One light and one dark. Is the plot trying to tell me something here?

SYSTEM INFORMATION: Version 8.0.1.0 Platform Linux x86(32-bit) Ubuntu 11.04

share|improve this question
    
I don't see this behavior on MacOSX and Mathematica 8.0.4. Can you please include information about your system into the question? –  halirutan Aug 21 '13 at 20:26
    
Please see edit. –  smilingbuddha Aug 21 '13 at 20:29
    
I can't see it because it keeps crashing the kernel in V9; I see the shading all the way across in V8.0.4 (not stopping at $y = - x$). There is a discontinuity at Abs[z] == 1, where the parametrization collapses to {0, 0} -- perhaps you want to consider RegionFunction, but I'm not sure exactly what you're trying to do.. –  Michael E2 Aug 21 '13 at 20:39
    
@MichaelE2 I have the same, and it seems to be related to the Boole expression. –  Sjoerd C. de Vries Aug 21 '13 at 21:22
    
This works for me: With[{z = x + I*y}, ParametricPlot[{Re[f[z]]*Boole[Abs[z] < 1], Im[f[z]]*Boole[Abs[z] < 1]}, {x, -plimit, plimit}, {y, -plimit, plimit}, PlotRange -> plrange, RegionFunction -> Function[{x, y}, x^2 + y^2 > 1]]] –  Sjoerd C. de Vries Aug 21 '13 at 21:25
show 2 more comments

1 Answer

up vote 3 down vote accepted

I believe what we see here is some over-folding artifact. You can prevent this by using RegionFunction to restrict the outside region used to a reasonable size

f = Function[z, 1/Conjugate[z]];
plimit = 1;
space = 2;
plrange = {{Re[f[-plimit]] - space, 
    Re[f[plimit]] + space}, {Im[f[-plimit]] - space, 
    Im[f[plimit]] + space}};

ParametricPlot[
 Evaluate@({Re[f[z]], Im[f[z]]}*Boole[Abs[z] < 1] /. 
    z -> x + I*y), {x, -plimit, plimit}, {y, -plimit, plimit},
 PlotRange -> plrange,
 RegionFunction -> Function[{x, y}, -5 < x < 5 && -5 < y < 5]]

Mathematica graphics

Still, since your example crashes version 9 on my Linux box, I believe there is some deeper issue here indicating a bug in Mathematica. Maybe it doesn't like when you turn the complex plane inside out...

enter image description here

pts = Table[{i, j}, {j, -3, 3, .5}, {i, -3, 3, .5}];
m[{x_, y_}] := {x, y}/(x^2 + y^2 + $MachineEpsilon)
Manipulate[
 With[{points = (1 - r)*pts + r*Map[m, pts, {2}]},
  Graphics[{Line /@ points, Line /@ Transpose[points]}]
  ],
 {r, 0, 1}]
share|improve this answer
    
This seems like a good work around. Thanks. –  smilingbuddha Aug 22 '13 at 1:07
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.