Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.4K Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

GrayLevel plots of complex functions?

Posted 2 years ago
POSTED BY: Veit Elser
3 Replies
Posted 2 years ago

Inspired by Henrik's idea, I came up with the following scheme (magnitude on the left, magnitude + phase ramps on the right):

enter image description here

I take the phase mod Pi/2 to get four sets of phase ramps and after mapping into the range [0,1] I also raise to the 10th power so the ramps, when added to the magnitudes, don't distract from the magnitudes.

POSTED BY: Veit Elser

Would something like this work for you?

func[x_, y_] := (-3 + (x + I y)^5)/(x + I y)^3

DensityPlot[Arg[func[x, y]], {x, -2, 2}, {y, -2, 2}, 
 MeshFunctions -> {(#3 &), Log[Abs[func[#1, #2]]] &}, 
 Mesh -> {30, 250}, ColorFunction -> GrayLevel, ImageSize -> Large, 
 PlotPoints -> 50]

enter image description here

POSTED BY: Henrik Schachner
Posted 2 years ago

Thanks! I should have emphasized that the plot also shows the magnitude (which diverges in your example). Here's how my method renders your function:

enter image description here

My functions don't diverge as they are defined by the Fourier transform. Here's how I've been generating them:

supp = 10; size = 400; prob = .2;

image = RotateLeft[ PadRight[ RandomInteger[BernoulliDistribution[prob], {supp, supp}], {size, size}], Floor[{supp, supp}/2]];

fourier = RotateRight[Fourier[image], Floor[{size, size}/2]];

POSTED BY: Veit Elser
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard