Over a million developers have joined DZone.
Platinum Partner

Fractal-Like Phase Plots

· Web Dev Zone

The Web Dev Zone is brought to you in partnership with Mendix.  Discover how IT departments looking for ways to keep up with demand for business apps has caused a new breed of developers to surface - the Rapid Application Developer.

Define f(z) = iz*exp(-z/sin(iz)) + 1 and g(z) = f(f(z)) + 2 for a complex argument z. Here’s what the phase plots of g look like.

The first image lets the real and imaginary parts of z range from -10 to 10.

This close-up plots real parts between -1 and 0, and imaginary part between -3 and -2.

The plots were produced with this Python code:

from mpmath import cplot, sin, exp

def f(z): return 1j*z*exp(-z/sin(1j*z)) + 1

def g(z): return f(f(z)) + 2

cplot(g, [-1,0], [-3,-2], points=100000)

The function g came from Visual Complex Functions.

The Web Dev Zone is brought to you in partnership with Mendix.  Learn more about The Essentials of Digital Innovation and how it needs to be at the heart of every organization.


Published at DZone with permission of John Cook , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}