Fractal Plots

05272019, 12:56 PM
(This post was last modified: 05272019 01:09 PM by Eddie W. Shore.)
Post: #1




Fractal Plots
Blog Entry: http://edspi31415.blogspot.com/2019/05/f...prime.html
The program CHAOS1 plots a fractal to simulate a Julia Set. Given the complex numbers z_k and c, repeats the equation: z_n = z_n1 + c^2 The program will ask for a sample graphing space with the a border B. The viewing window will be set up as: Xmin = B Xmax = B Ymin = B Ymax = B The program CHAOS1 will also as for the number of points (G), this will determine the number of points plotted in the graph. The higher G is, the more detailed the fractal is; however, the plot will take longer to complete. We start with each point on the graph z_0 = a + b*i, where i = √1. Then we calculate: z_1 = z_0^2 + c z_2 = z_1^2 + c z_3 = z_2^2 + c and so on. For each z_0, we have two possibilities for the repeated calculations: 1. z_n = abs(z_n) eventually goes towards infinity or 2. z_n = abs(z_n) eventually settles (or converges) to a specific point. A color is assigned to each point z_0. The color is determined by the amount of iterations it takes to reach z > 2. For such points that fit criteria 2, and never reaches z >2, the point is colored black. This method creates the Julia set for any given c. For the program CHAOS1, I set up a rank of colors to plot each point, and arbitrary pick a maximum amount of iterations. For example, I picked 9 colors for the TI84 Plus CE version. Hence for each point, if z ≤ 2 after 9 iterations, color the point black. Obviously the more levels (colors) we have, the more accurate our fractal is. With the programs listed, you can adjust the number of colors. I set 18 color levels, starting from white to black. Because of the faster processor and calculating speed, I have increased the number of grid points to 500. 250 makes a picture with lines. Note: I use the parenthesis notation (x,y) for the complex number x + yi because the imaginary character i unfortunately does not transfer to computer text. Code: EXPORT CHAOS1() Download the program (hpprgrm) here: https://drive.google.com/open?id=1A06e_p...jbLSUkVUN2 (The zip file also has a version for the TI84 Plus CE) 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)