Popular recipes tagged "fractal" but not "graphics"http://code.activestate.com/recipes/tags/fractal-graphics/2016-03-16T08:56:08-07:00ActiveState Code RecipesCreate 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 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>
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>
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>
Mandelbulb Fractal (Python)
2012-07-08T00:10:25-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578198-mandelbulb-fractal/
<p style="color: grey">
Python
recipe 578198
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>It draws a random 2D cross-section of Mandelbulb fractal.</p>
Generalized Apollonian Gasket Fractal (Python)
2012-02-01T02:49:09-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578029-generalized-apollonian-gasket-fractal/
<p style="color: grey">
Python
recipe 578029
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>It draws Apollonian Gasket Fractal for any n using Descartes theorem.</p>
<p>This is not the standard way though. It simply randomly finds 3 tangent circles at each iteration and tries to add new circles. The good thing is it can start w/ any arbitrary configuration of main circles, unlike the standard way. The bad thing is some circles will stay missing because of random selections they never get a chance. You can increase the maxIt to get better result but it would slow it down a lot.</p>
IFS fractal dimension calculation using box counting method (Python)
2012-02-12T04:09:43-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578037-ifs-fractal-dimension-calculation-using-box-counti/
<p style="color: grey">
Python
recipe 578037
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>IFS fractal dimension calculation using box-counting method.</p>
Apollonian Gasket Fractal using IFS (Python)
2012-01-14T22:02:10-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578016-apollonian-gasket-fractal-using-ifs/
<p style="color: grey">
Python
recipe 578016
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>It draws the central region of Apollonian Gasket fractal using IFS description. </p>
IFS fractals using automatic probability distribution (Python)
2012-03-11T21:50:31-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578069-ifs-fractals-using-automatic-probability-distribut/
<p style="color: grey">
Python
recipe 578069
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>To draw an IFS fractal probabilities of each transformation must be given normally.
This code calculates the probabilities using a heuristic instead.
The bounding rectangle of the fractal also calculated automatically. </p>
IFS fractal dimension calculation (Python)
2012-02-19T00:17:07-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578048-ifs-fractal-dimension-calculation/
<p style="color: grey">
Python
recipe 578048
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>I found this equation in Wikipedia page for "List of fractals by Hausdorff dimension".
The problem is how to calculate the scaling coefficients for any given IFS fractal.
You can see the heuristic I used in the code.
It gave correct values for all the fractals listed except for Centipede it gave 2.27. <br />
I do not know its correct fractal dimension to compare though.</p>
Fractal painter (Python)
2012-02-23T21:57:16-08:00James Coliinshttp://code.activestate.com/recipes/users/4167379/http://code.activestate.com/recipes/578051-fractal-painter/
<p style="color: grey">
Python
recipe 578051
by <a href="/recipes/users/4167379/">James Coliins</a>
(<a href="/recipes/tags/al/">al</a>, <a href="/recipes/tags/art/">art</a>, <a href="/recipes/tags/fractal/">fractal</a>).
</p>
<p>Paints a picture in the abstract style. </p>
Fractal painter (Python)
2012-02-17T04:07:45-08:00James Coliinshttp://code.activestate.com/recipes/users/4167379/http://code.activestate.com/recipes/578044-fractal-painter/
<p style="color: grey">
Python
recipe 578044
by <a href="/recipes/users/4167379/">James Coliins</a>
(<a href="/recipes/tags/art/">art</a>, <a href="/recipes/tags/fractal/">fractal</a>).
</p>
<p>Creates a semi random image, similar to a Jackson Pollock or Monet painting.</p>
Tetration Fractal (Python)
2011-10-24T02:55:08-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577917-tetration-fractal/
<p style="color: grey">
Python
recipe 577917
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>Tetration Fractal.</p>
Complex Polynomial Roots Fractal (Python)
2013-04-29T14:35:53-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577866-complex-polynomial-roots-fractal/
<p style="color: grey">
Python
recipe 577866
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/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>).
Revision 2.
</p>
<p>The code generates complex polynomials that has random real coefficients; each +1 or -1.
Later it plots the roots.</p>
<p>Warning: The calculation may take 15 minutes or so!</p>