Running the code on Windows 10 with an anaconda install of Python 3, I get only a segment of the actual set. It seems like it's a display issue, but if you can offer some troubleshooting, I would appreciate it.
Hi, i just tried to make this and it was successful ! However, my image is rotate by pi/2, so i just inverted row_index and column_index but is there an other solution ? thanks
That was exactly what I was thinking, but I couldn't figure out what was wrong, >_= 4: return i return max_iter columns = 2000 rows = 2000 result = np.zeros([rows, columns]) for row_index, Re in enumerate(np.linspace(-2, 1, num=rows)): for column_index, Im in enumerate(np.linspace(-1, -1, num=columns)): result[ row_index, column_index] = mandelbrot(Re, Im, 500) plt.figure(dpi=100) plt.imshow(result.T, cmap = 'hot', interpolation = 'bilinear', extent =[-2, 1, -1, 1]) plt.xlabel('Re') plt.ylabel('Im') plt.show()
Hi! There is a small typing error in your code. This line: "for column_index, Im in enumerate(np.linspace(-1, -1, num=columns)):" is supposed to be: "for column_index, Im in enumerate(np.linspace(-1, 1, num=columns)):" so there is a "-" that you don't need.
wow... I wrote a code in a different way and the figure was so rudimentary. I didn't use that convergence critera of |z| < 2. Instead, I iterated the expression for z_n 10 times (because more times than that would make NaN values begin to appear) and made a linear regression over those points. If the linear coefficient was negative, then it converges. Yeah, I know, it's a pretty bad test of convergence, but I was just playing. It generated an image that was poor, it didn't get even closer to the one you generated here with your code. Thanks for showing us how you did it.
i keep getting this error: ImportError: cannot import name 'autojit' from 'numba' (C:\Users\Tom\anaconda3\lib\site-packages umba\__init__.py) Where can I get autojit?
This is good, i tried it and it works, impored the stuff and all, but there was a maximum resolution in mine, i found out it was 5984X5984. Is there any way to increase the max resolution?
I'm afraid that is not possible, you need to compute every pixel individually, because even if you know the value of two points, you know nothing about the points between them.
H! Try adjusting the limits within 'numpy.linspace()': - setting the x-axis: 'numpy.linspace(X_LOWER, X_UPPER, num=rows)' - setting the y-axis: 'numpy.linspace(Y_LOWER, Y_UPPER, num=columns)' For example try 'numpy.linspace(-0.5, 1, num=rows)' and 'numpy.linspace(0, 1, num=columns)'. I recommend to flip the numpy array horizontally as well, because imshow does it by nature and it should be corrected: 'plt.imshow(numpy.flipud(result.T), ...)'. I hope it helps.
That isnt mandelbrot set by python but there have some solution of 'drawing mandelbrot set'. usually programmers introduce these set by mathmatical ways or using some pararell programming but this video just use **MODULE** so i dont advise these video. :(
Running the code on Windows 10 with an anaconda install of Python 3, I get only a segment of the actual set. It seems like it's a display issue, but if you can offer some troubleshooting, I would appreciate it.
This is a very good question! Could you check the boundaries?
Same problem here....if you know how to solve plz let me know
is there a possibility to see the figure grow pixel for pixel?
You can create animations in matplolib with FuncAnimation function. To zoom in shrink boundaries of Im and Re components.
Thank you this worked
I finally made my beloved mandelbrot set in python.
💪😃
Hi, i just tried to make this and it was successful ! However, my image is rotate by pi/2, so i just inverted row_index and column_index but is there an other solution ?
thanks
maybe you missed that he passed the transpose of the result set in imshow()
You are from Hungary? Helpful and great video btw!
Amazing
Hello, I copy exactly your code, and when running I get only vertical lines in the color 'hot', do you know why i can't get the mandelbrot image?
Hi! There may be a problem in indexing the grid points. Does changing the colormap solve the issue? Can you copy your code here?
That was exactly what I was thinking, but I couldn't figure out what was wrong, >_= 4:
return i
return max_iter
columns = 2000
rows = 2000
result = np.zeros([rows, columns])
for row_index, Re in enumerate(np.linspace(-2, 1, num=rows)):
for column_index, Im in enumerate(np.linspace(-1, -1, num=columns)):
result[ row_index, column_index] = mandelbrot(Re, Im, 500)
plt.figure(dpi=100)
plt.imshow(result.T, cmap = 'hot', interpolation = 'bilinear', extent =[-2, 1, -1, 1])
plt.xlabel('Re')
plt.ylabel('Im')
plt.show()
and changing the color doesn't fix it :(
Hi! There is a small typing error in your code. This line:
"for column_index, Im in enumerate(np.linspace(-1, -1, num=columns)):"
is supposed to be:
"for column_index, Im in enumerate(np.linspace(-1, 1, num=columns)):"
so there is a "-" that you don't need.
@@computationalscientist6368 u know your shit AND ur willing to help
How much memory does your computer have? I only get a round circle.
bro i got a LOT OF ERRORS how do i fix it.
wow... I wrote a code in a different way and the figure was so rudimentary. I didn't use that convergence critera of |z| < 2. Instead, I iterated the expression for z_n 10 times (because more times than that would make NaN values begin to appear) and made a linear regression over those points. If the linear coefficient was negative, then it converges.
Yeah, I know, it's a pretty bad test of convergence, but I was just playing. It generated an image that was poor, it didn't get even closer to the one you generated here with your code. Thanks for showing us how you did it.
thanks!
Nice Video! Where can i get a more detailed explanation of the code?
hi, how can I do this using the message passing method?
i keep getting this error:
ImportError: cannot import name 'autojit' from 'numba' (C:\Users\Tom\anaconda3\lib\site-packages
umba\__init__.py)
Where can I get autojit?
it is in numba package. however, in python 3 you need to use a different import statement.
try:
from numba.roc.decorators import autojit
I tried to implement the code but all I get is black plotiing and no mandelbrot , what is the problem ?
Your code, obviously
How can I change the colors of the Mandelbrot set?
You need to specify a different colormap (cmap). Here is a list of them:
matplotlib.org/3.1.0/tutorials/colors/colormaps.html
Hippety poppity your code is now my property
This is good, i tried it and it works, impored the stuff and all, but there was a maximum resolution in mine, i found out it was 5984X5984. Is there any way to increase the max resolution?
Hi! I've just tried, and I can generate a 7000x7000 image on my laptop. Is it possible that your PC runs out of memory? Can you check this?
A convinience actually, i’m getting a high-spec pc in july, i can tell you how it goes, has 16gb ram so that should be something improved.
@@bondy4869 Your max resolution is dependent on how much ram you have available
Have you tried generating something to a vector format instead of working with pixels?
I'm afraid that is not possible, you need to compute every pixel individually, because even if you know the value of two points, you know nothing about the points between them.
I need help zooming in on part of the image
H!
Try adjusting the limits within 'numpy.linspace()':
- setting the x-axis: 'numpy.linspace(X_LOWER, X_UPPER, num=rows)'
- setting the y-axis: 'numpy.linspace(Y_LOWER, Y_UPPER, num=columns)'
For example try 'numpy.linspace(-0.5, 1, num=rows)' and 'numpy.linspace(0, 1, num=columns)'.
I recommend to flip the numpy array horizontally as well, because imshow does it by nature and it should be corrected: 'plt.imshow(numpy.flipud(result.T), ...)'.
I hope it helps.
You can't do that in notebook, try a IDE, same code works don't implement autojit
That isnt mandelbrot set by python but there have some solution of 'drawing mandelbrot set'. usually programmers introduce these set by mathmatical ways or using some pararell programming but this video just use **MODULE** so i dont advise these video. :(
can you send python code for fractals
Actually this is a Python code for fractals.
can I use numbers?
I'm afraid I cannot understand your question.
@@computationalscientist6368 the extension of the numbers cuz I can't find pyglet or pygame anymore
extensions are vanishing
how do i run this
also can you make the code copy and paste because it didnt work