Created
September 10, 2010 04:47
-
-
Save ilg/573112 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module[{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, -\[Pi], \[Pi]}, {y, -3, 3}, | |
PlotPoints -> 250, AspectRatio -> 3/\[Pi], | |
ImageSize -> 300 (11 + 3.429/12)/6, | |
FrameTicks -> {{-\[Pi], 0, \[Pi]}, {-3, 0, 3}, None, None}, | |
FrameTicksStyle -> | |
Directive[FontFamily -> "Myriad Pro", FontSize -> 32], | |
FrameStyle -> Directive[Thick], | |
ColorFunction -> (GrayLevel[1 - #] &)]] | |
Module[{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, .6, .61}, {y, .97, .98 + 0.0026}, | |
PlotPoints -> 250, AspectRatio -> (20 + 10/12)/(18 + 5.143/12), | |
ImageSize -> 300 (18 + 5.143/12)/6, | |
FrameTicks -> {{0, .6, .61}, {0, .97, .98}, None, None}, | |
FrameTicksStyle -> | |
Directive[FontFamily -> "Myriad Pro", FontSize -> 32], | |
FrameStyle -> Directive[Thick], | |
ColorFunction -> (GrayLevel[1 - #] &)]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mathematica code used to produce the graphics in a brief piece in the October 2010 issue of Points & Angles (the newsletter of the Metropolitan Mathematics Club of Chicago).