Math Adventures with Python: An Illustrated Guide to Exploring Math with Code by Peter Farrell
Author:Peter Farrell
Language: eng
Format: mobi, pdf, epub
ISBN: 9781593278687
Publisher: No Starch Press, Inc.
Published: 2019-04-15T00:00:00+00:00
You can see that it diverges after four iterations because it gets bigger than two units away from the origin. Figure 7-7 graphs each step so you can visualize them.
Figure 7-7: Running the complex number 0.25 + 0.75 i through the mandelbrot() function until it diverges
The red circle has a radius of two units and represents the limit we put on the complex number diverging. When squaring and adding in the original value of z, we cause the locations of the numbers to rotate and translate and eventually to get further away from the origin than our rule allows.
Letâs use some of the graphing tricks we learned in Chapter 4 to graph points and functions in the Processing display. Copy and paste all the complex number functions from complex.py (cAdd, cMult, and magnitude) to the bottom of mandelbrot.pyde. Weâll use Processingâs println() function to print to the console the number of steps it takes a point to diverge. Add the code in Listing 7-4 before the mandelbrot() code you wrote in Listing 7-3.
mandelbrot.pyde
#range of x-values
xmin = -2
xmax = 2
Download
Math Adventures with Python: An Illustrated Guide to Exploring Math with Code by Peter Farrell.pdf
Math Adventures with Python: An Illustrated Guide to Exploring Math with Code by Peter Farrell.epub
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algebra | Calculus |
Combinatorics | Discrete Mathematics |
Finite Mathematics | Fractals |
Functional Analysis | Group Theory |
Logic | Number Theory |
Set Theory |
Modelling of Convective Heat and Mass Transfer in Rotating Flows by Igor V. Shevchuk(6189)
Weapons of Math Destruction by Cathy O'Neil(5728)
Factfulness: Ten Reasons We're Wrong About the World – and Why Things Are Better Than You Think by Hans Rosling(4435)
Descartes' Error by Antonio Damasio(3124)
A Mind For Numbers: How to Excel at Math and Science (Even If You Flunked Algebra) by Barbara Oakley(3057)
Factfulness_Ten Reasons We're Wrong About the World_and Why Things Are Better Than You Think by Hans Rosling(3008)
TCP IP by Todd Lammle(2965)
Applied Predictive Modeling by Max Kuhn & Kjell Johnson(2839)
Fooled by Randomness: The Hidden Role of Chance in Life and in the Markets by Nassim Nicholas Taleb(2810)
The Tyranny of Metrics by Jerry Z. Muller(2791)
The Book of Numbers by Peter Bentley(2723)
The Great Unknown by Marcus du Sautoy(2497)
Once Upon an Algorithm by Martin Erwig(2432)
Easy Algebra Step-by-Step by Sandra Luna McCune(2421)
Lady Luck by Kristen Ashley(2367)
Practical Guide To Principal Component Methods in R (Multivariate Analysis Book 2) by Alboukadel Kassambara(2347)
Police Exams Prep 2018-2019 by Kaplan Test Prep(2319)
All Things Reconsidered by Bill Thompson III(2226)
Linear Time-Invariant Systems, Behaviors and Modules by Ulrich Oberst & Martin Scheicher & Ingrid Scheicher(2193)
