TransWikia.com

JuliaSetPlot - how do I achieve nicer colors?

Mathematica Asked on May 6, 2021

I use the following code to generate images of Julia sets:

JuliaSetPlot[
   z^2 - 0.76 - 0.11 I, z, 
   PlotRange -> {{-1.6, 1.6}, {-1.0, 1.0}}, 
   MaxIterations -> 1000, 
   ImageResolution -> 1500
]

enter image description here

As you can see the colors are not too appealing. However I did code Julia sets in C# before and I know that the colors depend on the number of iterations so I tried less iterations:

enter image description here

This is what MaxIterations -> 100 gives me. I much prefer these colors. How can I get nicer colors while keeping a high number of iterations? I think ColorFunction or ColorFunctionScaling could get handy here but I never touched those so some help would be appreciated.

One Answer

You can scale the values supplied

JuliaSetPlot[z^2 - 0.76 - 0.11 I, z, PlotRange -> {{-1.6, 1.6}, {-1.0, 1.0}}, 
 MaxIterations -> 1000, ImageResolution -> 1500,
 ColorFunction ->
  With[{cf = ColorData["M10DefaultFractalGradient"]},
   cf@Sqrt[#3] &
   ]
 ]

enter image description here

Correct answer by b3m2a1 on May 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP