Popular recipes tagged "fractal"http://code.activestate.com/recipes/tags/fractal/2017-06-06T03:48:09-07:00ActiveState Code RecipesInteractive Mandelbrot Fractal Using HTML5 Canvas (JavaScript) 2017-06-06T03:48:09-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/580804-interactive-mandelbrot-fractal-using-html5-canvas/ <p style="color: grey"> JavaScript recipe 580804 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/canvas/">canvas</a>, <a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/math/">math</a>). </p> <p>Interactive Mandelbrot Fractal Using HTML5 Canvas.</p> <p>(Download and save as html file and open it.)</p> <p>(Tested only using Firefox browser.)</p> Random Planet Generator Using Plasma Fractal (Python) 2016-01-25T23:05:25-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/580495-random-planet-generator-using-plasma-fractal/ <p style="color: grey"> Python recipe 580495 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>). </p> <p>Random Planet Generator using 3D Plasma Fractal and Voxel-based Ray Tracing for rendering.</p> <p>Instead of generating 2D Plasma Fractal and projecting onto sphere, it generates 3D Plasma Fractal (cube) and cuts sphere from it.</p> Create Sierpinski Carpet (Fractal) FAST (Python) 2016-03-16T08:56:08-07:00Jorj X. McKiehttp://code.activestate.com/recipes/users/4193772/http://code.activestate.com/recipes/580624-create-sierpinski-carpet-fractal-fast/ <p style="color: grey"> Python recipe 580624 by <a href="/recipes/users/4193772/">Jorj X. McKie</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/sierpinski/">sierpinski</a>). </p> <p>Create a Sierpinski carpet using MuPDF's graphics library fitz (binding PyMuPDF) at high speed.</p> Sierpinski Gasket (Python) 2016-02-20T10:41:24-08:00Paulo Cavalcantihttp://code.activestate.com/recipes/users/4189949/http://code.activestate.com/recipes/580614-sierpinski-gasket/ <p style="color: grey"> Python recipe 580614 by <a href="/recipes/users/4189949/">Paulo Cavalcanti</a> (<a href="/recipes/tags/fractal/">fractal</a>). </p> <p>Creates a Sierpinski Gasket, by recursively partitioning an initial triangle (a,b,c) into three or four new triangles.</p> Mandelbrot Set made simple (Python) 2015-12-28T17:56:08-08:00Jack Trainorhttp://code.activestate.com/recipes/users/4076953/http://code.activestate.com/recipes/579143-mandelbrot-set-made-simple/ <p style="color: grey"> Python recipe 579143 by <a href="/recipes/users/4076953/">Jack Trainor</a> (<a href="/recipes/tags/educational/">educational</a>, <a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/mandelbrot/">mandelbrot</a>, <a href="/recipes/tags/mathematics/">mathematics</a>). Revision 2. </p> <p>This is a mini-framework for exploring the Mandelbrot Set.</p> <p>It outputs to a Tkinter window or to a PNG file (Pillow package required). It includes a disk caching mechanism for saving and later retrieving Mandelbrot calculations to avoid recalculating the Set on each run.</p> <p>See module documentation for further information. Compatible with Python 2 and 3.</p> Python Mandelbrot Fractal with Tkinter (Python) 2015-05-06T09:57:27-07:00Antoni Gualhttp://code.activestate.com/recipes/users/4182514/http://code.activestate.com/recipes/579048-python-mandelbrot-fractal-with-tkinter/ <p style="color: grey"> Python recipe 579048 by <a href="/recipes/users/4182514/">Antoni Gual</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). Revision 9. </p> <p>Displays in a Tk window a pretty coloured 640x480 Mandelbrot set in 6 seconds. Calculates each one of the 300K pixels with a maximum of 256 iterations. <br> Only Tkinter used. Tested with Python 3.4 <br> I will test any contribution and add it to the code if worthy.</p> Reaction Diffusion Simulation (Python) 2015-10-16T19:52:02-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579114-reaction-diffusion-simulation/ <p style="color: grey"> Python recipe 579114 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/chaos/">chaos</a>, <a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/physics/">physics</a>, <a href="/recipes/tags/simulation/">simulation</a>). Revision 2. </p> <p>Reaction-Diffusion Simulation using Gray-Scott Model.</p> Quasicrystal Pattern Generator (Python) 2015-08-08T20:50:23-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579094-quasicrystal-pattern-generator/ <p style="color: grey"> Python recipe 579094 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>). </p> <p>Quasicrystal Pattern Generator</p> Mandelbrot Fractal image output to ppm file (Python) 2015-01-17T19:21:47-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579006-mandelbrot-fractal-image-output-to-ppm-file/ <p style="color: grey"> Python recipe 579006 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>). </p> <p>It creates image output without using any external library.</p> <p>PPM image files can be viewed and converted to other image file formats using many applications, GIMP or IrfanView for example.</p> Circle Inversion Fractals (Python) 2013-10-30T03:53:31-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578765-circle-inversion-fractals/ <p style="color: grey"> Python recipe 578765 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>). </p> <p>Circle Inversion Fractals (Apollonian Gasket)</p> Random Spiral Fractals (Python) 2013-09-29T05:35:20-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578658-random-spiral-fractals/ <p style="color: grey"> Python recipe 578658 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>). Revision 2. </p> <p>This based on another of my posted codes, titled "Spiral IFS Fractals".</p> Hofstadter Butterfly Fractal (Python) 2013-09-23T03:18:02-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578670-hofstadter-butterfly-fractal/ <p style="color: grey"> Python recipe 578670 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/physics/">physics</a>). Revision 2. </p> <p>Hofstadter Butterfly Fractal</p> Mandelbrot Fractal using Tkinter (Python) 2013-07-06T23:53:20-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578590-mandelbrot-fractal-using-tkinter/ <p style="color: grey"> Python recipe 578590 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). </p> <p>Mandelbrot Fractal using Tkinter</p> Riemann Zeta Function Graph (Python) 2013-07-21T08:03:39-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578616-riemann-zeta-function-graph/ <p style="color: grey"> Python recipe 578616 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>). </p> <p>Riemann Zeta Function Graph</p> Gravner-Griffeath Snowflake Simulation (Python) 2013-05-27T00:13:09-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578533-gravner-griffeath-snowflake-simulation/ <p style="color: grey"> Python recipe 578533 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/physics/">physics</a>, <a href="/recipes/tags/simulation/">simulation</a>). Revision 2. </p> <p>Gravner-Griffeath snowflake simulation.</p> <p>For better results increase the image size and number of growth steps and prepare to wait!</p> Worley Noise Generator (Python) 2013-02-16T21:11:05-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578459-worley-noise-generator/ <p style="color: grey"> Python recipe 578459 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>). </p> <p>Worley Noise is a type of parametric texture used for water, rock, leaf etc. textures in computer graphics. </p> <p>The algorithm is a slightly modified version of Voronoi Diagram. </p> Perlin Noise Generator (Python) 2013-02-23T05:23:24-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578470-perlin-noise-generator/ <p style="color: grey"> Python recipe 578470 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/pil/">pil</a>). Revision 2. </p> <p>Perlin Noise Generator using Bilinear Interpolation.</p> True-color Mandelbrot Fractal (Python) 2013-01-14T02:07:47-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578415-true-color-mandelbrot-fractal/ <p style="color: grey"> Python recipe 578415 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/pil/">pil</a>). Revision 2. </p> <p>True-color Mandelbrot Fractal. It uses |x|, |y|, |z|, |angle(z)| values of the final iteration point for coloring.</p> Logistic Map Fractal (Python) 2013-01-19T00:27:29-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578426-logistic-map-fractal/ <p style="color: grey"> Python recipe 578426 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>). </p> <p>Logistic Map Fractal.</p> <p><a href="http://en.wikipedia.org/wiki/Logistic_map" rel="nofollow">http://en.wikipedia.org/wiki/Logistic_map</a></p> Snowflake Simulation Using Reiter Cellular Automata (Python) 2013-01-08T05:25:49-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578390-snowflake-simulation-using-reiter-cellular-automat/ <p style="color: grey"> Python recipe 578390 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>). Revision 2. </p> <p>This algorithm can create realistic looking snow crystals depending on the parameter values. (You can see good examples in the original paper by the author.)</p> <p>I also added coloring.</p> <p>Warning: Using current settings it takes about 30 minutes to run. I also do not recommend running it using IDLE.</p>