This is a work in progress. Unlike mainstream mathematics this is more like an experiment than a typical mathematical construct. I'm attempting to use the Mandelbrot set and the first and second derivatives thereof in the construction and solution of differential equations. Just as the Maxwell equations have a general solution in terms of a complex exponential so might other differential equations have a solution in terms of the Mandelbrot set. This is a big if and a differential equation with a known result is required ; that's my next step. This is a numerical approach that utilizes the power of Fractint to find the regions of stability ; the black regions when inside colour is numb. That's interesting about P3 , the main difference between P2 and P3 that I found is how the print statement is used. Python is unexpectedly powerful , the 3d graphics via Mayavi is something that I've been wanting for a long time. I think that the Mandelbulber program was written in Python. Sciwise On 08/12/2016 17:29, LLOYD GARRICK wrote:
Hey thanx for that!
Cool graphs, but I am not sure exactly what they mean......
I am
just learning Python too, the first thing I try is fractals. But it seems all the points are plotted in memory first and then the entire graph is shown. I am trying to figure how to plot points in real time so you can see it drawing.
Your code runs in both P2 and P3 (Linux);
but P3 seems much faster.
On December 7, 2016 at 3:00 AM
sciwise@ihug.co.nz wrote:
Maxima CAS has a few limitations ,
hence I now program in Python
too.
This code calculates the second derivative of the Mandelbrot series for an
initial complex value of c . The real and imaginary components are then graphed.
The first 80 values have been set to a constant so that the stable condition might
be observed.
File
mltplotz.py
--- code ---
""" (c) copyright 2016
sciwise@ihug.co.nz
Simple demo with multiple subplots.
Derivatives
of Mandelbrot series .
""" import numpy as np import matplotlib.pyplot as plt
n=128
x2 = np.array((np.linspace(0,n,n))) y2r =
np.array((np.linspace(0,n,n)))
y2i = np.array((np.linspace(0,n,n)))
for i in range(n): y2r[i] = 0.0 y2i[i] = 0.0
'''
Fractal calculations .
'''
c=-0.5 + 0.3j z = c z1 = 1.0 z2 = 0.0
itr=0
while ( itr < n) and (abs(z2) < 100000): z2 =2*z1*z1 +2*z2*z z1 = 2*z*z1 + 1 z = z*z+c y2r[itr] = z2.real
y2i[itr] = z2.imag
itr=itr+1
"""
Values after 60 iterations are of interest .
"""
for i in range(80):
y2r[i] = 0.29 y2i[i] = 0.186
plt.subplot(2, 1, 1)
plt.plot(x2, y2r, 'r.-') plt.title('Second Derivative of Mandelbrot series.') plt.xlabel('index')
plt.ylabel('Real z2')
plt.subplot(2, 1, 2) plt.plot(x2,
y2i, 'b.-')
plt.xlabel('index') plt.ylabel('Imaginary z2')
plt.show()
exit(0)
Fractint mailing list Fractint@mailman.xmission.com
https://mailman.xmission.com/cgi-bin/mailman/listinfo/fractint