Popular recipes tagged "graphics" but not "mathematics"http://code.activestate.com/recipes/tags/graphics-mathematics/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>
Image to ASCII Art Converter (Python)
2016-09-25T21:24:12-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/580702-image-to-ascii-art-converter/
<p style="color: grey">
Python
recipe 580702
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/images/">images</a>, <a href="/recipes/tags/pil/">pil</a>).
</p>
<p>ASCII Art Generator (Image to ASCII Art Converter)</p>
<p>Input file maybe JPG, PNG, GIF etc.
Output file name maybe output.txt etc.</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>
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>
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>
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>
Dynamical Billiards Simulation (Python)
2013-06-20T06:57:57-07:00Steve Wadleyhttp://code.activestate.com/recipes/users/4186942/http://code.activestate.com/recipes/578572-dynamical-billiards-simulation/
<p style="color: grey">
Python
recipe 578572
by <a href="/recipes/users/4186942/">Steve Wadley</a>
(<a href="/recipes/tags/chaos/">chaos</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/pil/">pil</a>, <a href="/recipes/tags/random/">random</a>).
</p>
<p>It simulates reflections of a ball on a billiards table that has one or more circular obstacles.
(This can also be thought as a 2d ray-tracing.)</p>
<p>Most of the time the path of the ball would be chaotic (meaning, if another ball started from any slightly different location or direction then its path would be very different after a short while). </p>
<p>See Wikipedia for more info:
<a href="http://en.wikipedia.org/wiki/Dynamical_billiards" rel="nofollow">http://en.wikipedia.org/wiki/Dynamical_billiards</a></p>
Random Maze Generator (Python)
2012-12-14T09:09:22-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578356-random-maze-generator/
<p style="color: grey">
Python
recipe 578356
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/ai/">ai</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/pil/">pil</a>).
Revision 2.
</p>
<p>Random maze generator using depth-first search.</p>
<p>It starts the maze path from a random cell and there is no exit defined but actually any 2 cells on the path (white cells) can be assigned to be entry and exit locations. (I could just add code to randomly select 2 white cells and change their colors to something else but I thought it looks better this way.)</p>
Random Multi-Maze Generator (Python)
2012-12-14T11:23:29-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578378-random-multi-maze-generator/
<p style="color: grey">
Python
recipe 578378
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/ai/">ai</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/pil/">pil</a>).
</p>
<p>Randomly creates mazes which have multiple paths to solve.
Entry and exit points for each path can be assigned arbitrarily.
(I never seen this kind of maze anywhere before but I think calling them multi-maze should be okay.)</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>
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>
Dynamical Billiards Simulation (Python)
2010-10-30T06:22:28-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577445-dynamical-billiards-simulation/
<p style="color: grey">
Python
recipe 577445
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/chaos/">chaos</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/pil/">pil</a>, <a href="/recipes/tags/random/">random</a>).
</p>
<p>It simulates reflections of a ball on a billiards table that has one or more circular obstacles.
(This can also be thought as a 2d ray-tracing.)</p>
<p>Most of the time the path of the ball would be chaotic (meaning, if another ball started from any slightly different location or direction then its path would be very different after a short while). </p>
<p>See Wikipedia for more info:
<a href="http://en.wikipedia.org/wiki/Dynamical_billiards" rel="nofollow">http://en.wikipedia.org/wiki/Dynamical_billiards</a></p>
Langton's Ant Automaton (Java)
2011-02-17T21:53:36-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577576-langtons-ant-automaton/
<p style="color: grey">
Java
recipe 577576
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/applet/">applet</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/math/">math</a>).
</p>
<p>(Generalized) Langton's Ant Automaton.</p>
<p>Langton's ant is a 2D Turing machine.
In this version, at each new x,y location the ant reads the byte value and replaces it w/ another, and chooses a new direction (one of 8 possible directions) to move.</p>
<p>Byte replacement and direction values are read from random arrays.</p>
Bifurcation diagram of logistic map (Python)
2010-07-24T02:40:54-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577332-bifurcation-diagram-of-logistic-map/
<p style="color: grey">
Python
recipe 577332
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/math/">math</a>).
Revision 2.
</p>
<p>Bifurcation diagram of the logistic map.</p>
Mandelbrot fractal using PIL (Python)
2010-03-26T04:39:46-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577111-mandelbrot-fractal-using-pil/
<p style="color: grey">
Python
recipe 577111
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/math/">math</a>).
Revision 2.
</p>
<p>Mandelbrot fractal using Python Image Library (PIL).</p>
Sierpinski Square combination fractal (Python)
2010-08-11T20:06:42-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577354-sierpinski-square-combination-fractal/
<p style="color: grey">
Python
recipe 577354
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/math/">math</a>).
</p>
<p>Combination of Sierpinski Square and 2 other square fractals!</p>
Voronoi diagram (Python)
2010-08-11T20:03:28-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577353-voronoi-diagram/
<p style="color: grey">
Python
recipe 577353
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>).
</p>
<p>Voronoi diagram.</p>
Newton Fractals (Python)
2010-03-30T04:50:09-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577166-newton-fractals/
<p style="color: grey">
Python
recipe 577166
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/math/">math</a>).
</p>
<p>It draws the Newton fractal of any given complex-variable function.</p>