Question

Please provide this solution in PYTHON. Thanks in advance. Plot the Julia set for C=0.285+0.01i

Please provide this solution in PYTHON. Thanks in advance.

Plot the Julia set for C=0.285+0.01i

Homework Answers

Answer #1

import numpy as np

import matplotlib.pyplot as plt

import matplotlib.cm as cm

# Image width and height; parameters for the plot

im_width, im_height = 500, 500

c = complex(0.285, 0.01)

zabs_max = 10

nit_max = 1000

xmin, xmax = -1.5, 1.5

xwidth = xmax - xmin

ymin, ymax = -1.5, 1.5

yheight = ymax - ymin

julia = np.zeros((im_width, im_height))

for ix in range(im_width):

for iy in range(im_height):

nit = 0

# Map pixel position to a point in the complex plane

z = complex(ix / im_width * xwidth + xmin,

iy / im_height * yheight + ymin)

# Do the iterations

while abs(z) <= zabs_max and nit < nit_max:

z = z**2 + c

nit += 1

shade = 1-np.sqrt(nit / nit_max)

ratio = nit / nit_max

julia[ix,iy] = ratio

fig, ax = plt.subplots()

ax.imshow(julia, interpolation='nearest', cmap=cm.hot)

plt.show()

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Please explain the meaning of positive and negative Hall effect.   thanks in advance.
Please explain the meaning of positive and negative Hall effect.   thanks in advance.
Please explain physically and make the math please ! thanks in advance Let ∆? be the...
Please explain physically and make the math please ! thanks in advance Let ∆? be the pressure difference exerted on a tube by the passage of a fluid through it. How should this value be modified if the tube diameter is reduced by 10%, and it is desired to maintain the same flow?
Use python (spi.RK45 )to code the Runge Kutta method to approximate/plot the solution the following initial-value...
Use python (spi.RK45 )to code the Runge Kutta method to approximate/plot the solution the following initial-value ?′=1+(?−?)2, 2<?<3, ?(2)=1y′=1+(t−y)2, 2
What is the purpose of a scatter diagram (Scatter plot)? (Please provide Scatter plot examples)
What is the purpose of a scatter diagram (Scatter plot)? (Please provide Scatter plot examples)
What is the purpose of a scatter diagram (Scatter plot)? (Please provide Scatter plot examples)
What is the purpose of a scatter diagram (Scatter plot)? (Please provide Scatter plot examples)
PLEASE SHOW COMPLETE AND CLEAR SOLUTION thanks. A 51.6-mL dilute solution of acid at 23.85°C is...
PLEASE SHOW COMPLETE AND CLEAR SOLUTION thanks. A 51.6-mL dilute solution of acid at 23.85°C is mixed with 48.5 mL of a dilute solution of base, also at 23.85°C, in a coffee-cup calorimeter. After the reaction occurs, the temperature of the resulting mixture is 27.25°C. The density of the final solution is 1.03 g/mL. Calculate the amount of heat evolved. Assume the specific heat of the solution is 4.184 J/g•°C. The heat capacity of the calorimeter is 23.9 J/°C.
You can use dsolve in MATLAB...run simplify(...) on the solution...You should plot the homogeneous and the...
You can use dsolve in MATLAB...run simplify(...) on the solution...You should plot the homogeneous and the inhomogeneous solutions on the same graph, using the "plot" function of MATLAB. set the arbitrary constants to 1 Consider the homogeneous equation y'' + 3y' + 2y = 0. a) Solve it and set the c's to 1. Graph this transient solution using large dots in MATLAB. b) Now add on the right-hand side the linear term 12x. Solve the inhomogeneous equation y'' +...
Thanks in advance. Please match term and descriptor. a. occipital lobe b. temporal lobe c. frontal...
Thanks in advance. Please match term and descriptor. a. occipital lobe b. temporal lobe c. frontal lobe d. parietal lobe e. insular lobe ___ in dominant hemisphere, involved in motor planning for articulation _d_ includes the auditory reception area ___ includes the primary somatosensory region _a_ includes the primary visual reception region ___ lobe posterior to the parietal lobe ___ involved in integration of somatosensory integration and visual information of dorsal visual stream ___ in non-dominant hemisphere, involved in insight,...
Please answer all parts as I am limited on questions. Thanks in advance. Determine the pH...
Please answer all parts as I am limited on questions. Thanks in advance. Determine the pH of an HFsolution of each of the following concentrations. In which cases can you not make the simplifying assumption that x is small? (Ka for HF is 6.8×10−4) Part A 0.260 M Express your answer to two decimal places. Part B: 0.0490 M Part C: 0.0250 M
Please explain the answer of this question without using the unit normal table. Thanks in advance....
Please explain the answer of this question without using the unit normal table. Thanks in advance. One question on a multiple-choice test asked for the probability of selecting a score greater than X = 50 from a normal population with a population mean = 60 and a population standard deviation = 20. The answer choices were: a. 0.1915 b. 0.3085 c. 0.6915 Without looking at the unit normal table, explain why answers a. and b. cannot be correct.