Popular recipes tagged "graphics" but not "pil"http://code.activestate.com/recipes/tags/graphics-pil/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>
ASCII art Sphere with integer square root (Batch)
2016-06-06T10:09:38-07:00Antoni Gualhttp://code.activestate.com/recipes/users/4182514/http://code.activestate.com/recipes/580673-ascii-art-sphere-with-integer-square-root/
<p style="color: grey">
Batch
recipe 580673
by <a href="/recipes/users/4182514/">Antoni Gual</a>
(<a href="/recipes/tags/ascii/">ascii</a>, <a href="/recipes/tags/graphics/">graphics</a>).
Revision 2.
</p>
<p>The code draws a sphere in ASCII Art. Square root routine bt Aacini</p>
Simple drawing tool with Python turtle graphics (Python)
2016-01-27T22:22:01-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580544-simple-drawing-tool-with-python-turtle-graphics/
<p style="color: grey">
Python
recipe 580544
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/drawing/">drawing</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/python2/">python2</a>, <a href="/recipes/tags/tkinter/">tkinter</a>, <a href="/recipes/tags/turtle/">turtle</a>).
</p>
<p>A simple drawing program that lets you use your keyboard to draw figures on screen, using the turtle graphics module built into Python.</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>
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>
Animated raster graphics demo in Tkinter (Python)
2015-05-05T20:26:41-07:00Antoni Gualhttp://code.activestate.com/recipes/users/4182514/http://code.activestate.com/recipes/579052-animated-raster-graphics-demo-in-tkinter/
<p style="color: grey">
Python
recipe 579052
by <a href="/recipes/users/4182514/">Antoni Gual</a>
(<a href="/recipes/tags/animation/">animation</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 4.
</p>
<p>EDITED:
A small animated graphics demo in Tkinter, displaying a 1990's style Rotozoom, more interesting than the TV snow I posted previously. The Tkinter management part is just the same. The code is a little longer as some trig tables must be precalculated for speed. The window size corresponds to the resolution of the old DOS screen 13, as I originally coded the demo for Qbasic. </p>
Simple Text Mode Digital Oscilloscope Graphics DEMO. (Python)
2014-01-21T19:07:49-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578812-simple-text-mode-digital-oscilloscope-graphics-dem/
<p style="color: grey">
Python
recipe 578812
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>).
</p>
<p>This is a DEMO to switch a *NIX terminal from text to _graphics_ mode on the fly.</p>
<p>The graphics characters are limited to lowercase 'a' through 'z' and
this DEMO just prints a small subset to see what a fun, kids level, 8
channel Logic-Analyser/Digital-Oscilloscope might look like.</p>
<p>This may not work in every *NIX style terminal but does work on default
terminals using bash on OSX 10.7.5, PCLinuxOS 2009 and Debian Linux 6.0.x.</p>
<p>Tested on Python 2.5.x to 3.3.2 on the above platforms...
(It might work on earlier versions of Python but untested.)</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<p>Bazza...</p>
Voxel Based Ray Tracing (Python)
2013-08-29T06:11:41-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578652-voxel-based-ray-tracing/
<p style="color: grey">
Python
recipe 578652
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>).
</p>
<p>The standard ray tracing algorithm seems unnatural to me because everytime a ray reflects/refracts all (primitive) objects in the scene must be tested for intersection; no matter where they located!</p>
<p>In this method there is no such thing. It just moves each ray voxel by voxel until it hits an opaque/reflective(/refractive) voxel.</p>
<p>I made many simplifications so the image is crude.</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>
pack multiple images of different sizes into one image (Python)
2013-06-27T14:50:37-07:00Hugohttp://code.activestate.com/recipes/users/4183663/http://code.activestate.com/recipes/578585-pack-multiple-images-of-different-sizes-into-one-i/
<p style="color: grey">
Python
recipe 578585
by <a href="/recipes/users/4183663/">Hugo</a>
(<a href="/recipes/tags/graphics/">graphics</a>).
</p>
<p>Packing images of different sizes into one image is often required in order to efficiently use hardware accelerated texture mapping functions of 3D video cards.</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>
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>
Use PIL to make a "contact sheet" montage of images (Python)
2012-09-21T11:06:58-07:00Hugohttp://code.activestate.com/recipes/users/4183663/http://code.activestate.com/recipes/578267-use-pil-to-make-a-contact-sheet-montage-of-images/
<p style="color: grey">
Python
recipe 578267
by <a href="/recipes/users/4183663/">Hugo</a>
(<a href="/recipes/tags/graphics/">graphics</a>).
Revision 2.
</p>
<p>The Python Imaging Library (PIL) makes many tasks easy in digital photography. This recipe shows how to make a "contact sheet" of images, a single image with thumbnails of many different pictures. It's limited in that it will only work with pictures of the same shape, but you can make some really fun images.</p>
Bezier Curve using De Casteljau algorithm (Python)
2011-11-25T02:33:54-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577961-bezier-curve-using-de-casteljau-algorithm/
<p style="color: grey">
Python
recipe 577961
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>).
</p>
<p>Draws a random Bezier Curve using De Casteljau algorithm.</p>
Draw SVG Images In Python (Python recipe) - enhanced Version (Python)
2012-05-10T16:27:18-07:00Isendrak Skatasmidhttp://code.activestate.com/recipes/users/4182031/http://code.activestate.com/recipes/578123-draw-svg-images-in-python-python-recipe-enhanced-v/
<p style="color: grey">
Python
recipe 578123
by <a href="/recipes/users/4182031/">Isendrak Skatasmid</a>
(<a href="/recipes/tags/graphics/">graphics</a>).
</p>
<p>This script draws simple SVG images composed of circles, squares, lines, text, etc.</p>
IFS fractals using iteration method (Python)
2012-01-07T18:33:21-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578003-ifs-fractals-using-iteration-method/
<p style="color: grey">
Python
recipe 578003
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>This method uses inverse IFS transformations (assume new x, new y are known and x, y are unknown and solve the equation), and unlike IFS algorithm, it does not use a random number generator and neither the probability coefficients for each IFS transformation.
(Except when IFS algorithm is used in the beginning to find bounding rectangle of the fractal.) </p>
Dragon Fractal Using Iteration Method (Python)
2012-01-07T05:31:10-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578002-dragon-fractal-using-iteration-method/
<p style="color: grey">
Python
recipe 578002
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>This method uses inverse IFS transformations and it does not use a random number generator.</p>