mandelbrot

For all the creative people out there: coloring mandelbrot set… need ideas

感情迁移 提交于 2019-12-04 05:53:32
Given max amount of iterations = 1000 give me some ideas on how to color (red, green, blue) it. All I can come up right now are lame 2 color gradients :( Is it actually possible to come up with something as beautiful as this? 50 iterations is very, very coarse and you won't get much detail. The easiest way to get the spectrum is to use multiple two-color gradients. So, 50-41 iterations might be shades of blue, 41-30 might be blue-red, and 29-10 might be red-green, and 9-0 might be green-white. An RGB monitor's gamut is triangular, so such a scheme pretty much follows the outside of the "color

Calculate Mandelbrot set for greater precision

荒凉一梦 提交于 2019-12-03 20:46:11
Is there any practical way to perform calculations such as those involved in generating the Mandelbrot Set for values for precise that what double or long double can provide? I was thinking of possibly having two variables(either double or long), one storing the value similar to scientific notation and the other storing the negative log10 of the value, but I'm not sure if there would actually be a way to perform the calculation like this. 来源: https://stackoverflow.com/questions/43118611/calculate-mandelbrot-set-for-greater-precision

Code golf: the Mandelbrot set

百般思念 提交于 2019-12-03 01:53:49
问题 Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. Usual rules for the code golf. Here is an implementation in python as an example from PIL import Image im = Image.new("RGB", (300,300)) for i in xrange(300): print "i = ",i for j in xrange(300): x0 = float( 4.0*float(i-150)/300.0 -1.0) y0 = float( 4.0*float(j-150)/300.0 +0.0) x=0.0 y=0.0 iteration = 0 max_iteration =

Code golf: the Mandelbrot set

孤街醉人 提交于 2019-12-02 14:04:39
Usual rules for the code golf. Here is an implementation in python as an example from PIL import Image im = Image.new("RGB", (300,300)) for i in xrange(300): print "i = ",i for j in xrange(300): x0 = float( 4.0*float(i-150)/300.0 -1.0) y0 = float( 4.0*float(j-150)/300.0 +0.0) x=0.0 y=0.0 iteration = 0 max_iteration = 1000 while (x*x + y*y <= 4.0 and iteration < max_iteration): xtemp = x*x - y*y + x0 y = 2.0*x*y+y0 x = xtemp iteration += 1 if iteration == max_iteration: value = 255 else: value = iteration*10 % 255 print value im.putpixel( (i,j), (value, value, value)) im.save("image.png", "PNG"

Why is turtle lightening pixels?

不想你离开。 提交于 2019-12-01 16:28:54
My program for creating a Mandelbrot set has a bug: whenever the pen changes colors, and every 42nd pixel after that, is lighter. This is, rather coincidentally, a mandelbug (yes, I just learned that term), as it is inconsistent for many pixels near an "edge" (it might actually be blurred between the color it's supposed to be and the color the last, or next, pixel is supposed to be), but it's always the 42nd pixel after that one until the next color change. I am using OSX 10.6.8, PYTHON 2.7. When I wrote this program at school, it worked perfectly (Windows), and then I sent it to myself, and

extending mandelbrot to generate julia

℡╲_俬逩灬. 提交于 2019-12-01 14:03:53
working on a project requiring me to use same code ,note in the same file to generate mandelbrot set and julia sets ,i hav a working mandelbrot set but can see how to extend to julia set using same code. maybe am not getting the differences between ? can anyone elaborate import numpy as np import matplotlib.pyplot as plt import math def Mandelbrot(zmin, zmax, m, n, tmax=256): xs = np.linspace(zmin, zmax, n) ys = np.linspace(zmin, zmax, m) X, Y = np.meshgrid(xs, ys) Z = X + 1j * Y C = np.copy(Z) M = np.ones(Z.shape) * tmax for t in xrange(tmax): mask = np.abs(Z) <= 2. Z[ mask] = Z[mask]**2 + C

extending mandelbrot to generate julia

╄→尐↘猪︶ㄣ 提交于 2019-12-01 12:58:07
问题 working on a project requiring me to use same code ,note in the same file to generate mandelbrot set and julia sets ,i hav a working mandelbrot set but can see how to extend to julia set using same code. maybe am not getting the differences between ? can anyone elaborate import numpy as np import matplotlib.pyplot as plt import math def Mandelbrot(zmin, zmax, m, n, tmax=256): xs = np.linspace(zmin, zmax, n) ys = np.linspace(zmin, zmax, m) X, Y = np.meshgrid(xs, ys) Z = X + 1j * Y C = np.copy

Mandelbrot-algorithm - Background color

好久不见. 提交于 2019-12-01 10:39:32
问题 I'm writing a Mandelbrot app in C# (and I'm testing with Python). I already have the continous coloring from the set to its borders. My current problem is to set the background color of the environment. My current code for getting the color now looks like this, it gets the color as double (the logarithm function is done before) and checks wether it's part or not and creates a quite smooth gradient (from black to orange). private Color getColor(double i) { double ratio = i / (double)

Some help rendering the Mandelbrot set

你离开我真会死。 提交于 2019-12-01 06:51:16
I have been given some work to do with the fractal visualisation of the Mandelbrot set. I'm not looking for a complete solution (naturally), I'm asking for help with regard to the orbits of complex numbers. Say I have a given Complex number derived from a point on the complex plane. I now need to iterate over its orbit sequence and plot points according to whether the orbits increase by orders of magnitude or not. How do I gather the orbits of a complex number? Any guidance is much appreciated (links etc). Any pointers on Math functions needed to test the orbit sequence e.g. Math.pow() I'm

Having trouble calculating mandelbrot set iterations

狂风中的少年 提交于 2019-12-01 04:23:28
问题 So I read up this article: http://www.wikihow.com/Plot-the-Mandelbrot-Set-By-Hand But I'm stuck at step 7. I'm drawing the set in javascript canvas. All I need is basicly the C value I guess. for (var y = 0; y < ImageHeight; y++) { for (var x = 0; x < ImageWidth; x++) { // Pixel-Position for ImageObject var xy = (x + y * image.width) * 4; // Convert Image-Dimension to a radius of 2 var xi = ((x / ImageWidth) * 4) - 2; var yi = ((y / ImageHeight) * 4) - 2; for (var n = 0; n < MaxIterations; n+