Skip to content

@ilg /gist:497210
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
cosineEscapeTime =
Compile[{{c, _Complex}},
Block[{z = c, n = 2, escapeRadius = 10 \[Pi], maxIterations = 100},
While[And[Abs[z] <= escapeRadius, n < maxIterations],
z = Cos[z] + c; n++]; n]]
DensityPlot[
cosineEscapeTime[x + I y], {x, -2 \[Pi],
2 \[Pi]}, {y, -\[Pi], \[Pi]}, PlotPoints -> 250,
AspectRatio -> (1/2), ColorFunction -> "TemperatureMap"]
Block[{center = {0.5527, 0.9435}, radius = 0.1},
DensityPlot[
cosineEscapeTime[x + I y], {x, center[[1]] - radius,
center[[1]] + radius}, {y, center[[2]] - radius,
center[[2]] + radius}, PlotPoints -> 250, AspectRatio -> 1,
ColorFunction -> "TemperatureMap"]]
sineEscapeTime =
Compile[{{c, _Complex}},
Block[{z = c, n = 2, escapeRadius = 10 \[Pi], maxIterations = 100},
While[And[Abs[z] <= escapeRadius, n < maxIterations],
z = Sin[z] + c; n++]; n]]
DensityPlot[
sineEscapeTime[x + I y], {x, -2 \[Pi], 2 \[Pi]}, {y, -\[Pi], \[Pi]},
PlotPoints -> 100, AspectRatio -> (1/2),
ColorFunction -> "TemperatureMap"]
expEscapeTime =
Compile[{{c, _Complex}},
Block[{z = c, n = 2, escapeRadius = 50, maxIterations = 100},
While[And[Abs[z] <= escapeRadius, n < maxIterations], z = E^z + c;
n++]; n]]
DensityPlot[expEscapeTime[x + I y], {x, -1, 3.5}, {y, -\[Pi], \[Pi]},
PlotPoints -> 250, AspectRatio -> 2 \[Pi]/4.5,
ColorFunction -> "TemperatureMap"]
Block[{center = {1.142, 1.408}, radius = 0.1},
DensityPlot[
expEscapeTime[x + I y], {x, center[[1]] - radius,
center[[1]] + radius}, {y, center[[2]] - radius,
center[[2]] + radius}, PlotPoints -> 250, AspectRatio -> 1,
ColorFunction -> "TemperatureMap"]]
logisticEscapeTime =
Compile[{{c, _Complex}},
Block[{z = c, n = 2, escapeRadius = 50, maxIterations = 200},
While[And[Abs[z] <= escapeRadius, n < maxIterations],
z = c z (1 - z); n++]; n]]
DensityPlot[
logisticEscapeTime[x + I y], {x, -1.5, 1.5}, {y, -1.5, 1.5},
PlotPoints -> 250, AspectRatio -> 1,
ColorFunction -> "TemperatureMap"]
Block[{center = {1, .25}, radius = 0.1},
DensityPlot[
logisticEscapeTime[x + I y], {x, center[[1]] - radius,
center[[1]] + radius}, {y, center[[2]] - radius,
center[[2]] + radius}, PlotPoints -> 250, AspectRatio -> 1,
ColorFunction -> "TemperatureMap"]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.