![]() | Ned Batchelder : Blog | Code | Text | Site Aptus » Home : Code |
Created 10 October 2007, last updated 20 April 2008 Aptus is a Mandelbrot set viewer and renderer. It is written in Python with a computation engine in C for speed. Getting AptusPre-requisitesAptus installs like any other Python package. Before installing Aptus, you'll need to install these prerequisite Python packages:
InstallationDownload the kit that's right for you. Linux and Mac use the tar.gz, Windows users will probably be happier with the .exe: Download: Aptus-1.56.tar.gzDownload: Aptus-1.56.win32-py2.5.exe Install the kit with the usual command: python setup.py install Using AptusThere are two ways to use Aptus: a GUI explorer, and a command line renderer. The GUI lets you zoom in and out, and change the color palette to find an image you like. The command line renderer produces higher-quality images. Parameter filesAptus stores information about the image to display in a few ways. Small textual .aptus files store all the parameters needed to recreate an image, and can be saved from the GUI and fed to the command line renderer. When saving an image as a .PNG file, Aptus also stores all its parameter information in a text block hidden in the image, so that the .PNG can be used directly as a parameter file. Aptus can also read Xaos .xpf files so that you can use Xaos to explore, and Aptus to render if you like. GUI usageStart Aptus with aptusgui.py, and start poking around. Left click or drag zooms you in, right click zooms you out. Type 'h' for help on other controls. aptusgui.py also accepts applicable command-line switches so you can start it from a parameter file, or specify the size of the window, and so on. Command line usageThe command line renderer is called aptuscmd.py. It will accept a number of switches or parameter files: Usage: aptuscmd.py [options] [parameterfile] HistoryVersion 1.56, April 2008More display improvements and simplifications. Thanks, Paul Ollis. Version 1.55, April 2008The display is now flicker-free. Thanks, Rob McMullen. Version 1.51, March 2008Fixed a few bugs, including not drawing at all on Mac or Linux! Version 1.5, March 2008A number of improvements:
Version 1.0, October 2007First version. More samplesSee also
| |
Comments
Hi! Sounds like an interesting app. I've been fascinated by fractals since learning about them in high school, lo these many years ago.
I've tried installing the app in Ubuntu Linux. It's compiled and installed. However, when I run
$ python /usr/bin/aptusgui.py
I get a gray window and a bunch of error messages to the console. The central error is
RuntimeError: Failed to gain raw access to bitmap data.
I think I've got all the prerequisites installed, otherwise I shouldn't have been able to install it, right?
Thanks,
/g.
I was experimenting with a numpy version, and wanted to see if I could code up a faster version in C. The obligatory google search turned up your version; well done!
A segfault turned up on my amd64 machine with python 2.5: I had to change "int ncolbytes" to "Py_ssize_t ncolbytes" (line 504 in engine.c). It looks like the API for PyString_AsStringAndSize changed between python 2.4 and 2.5...
Rob, thanks for the micro-patch. The problem wasn't the change from 2.4 to 2.5 (I build Aptus under 2.5), but that I am using a 32-bit platform where there is no difference between Py_ssize_t and int.
Hi,
I installed the thing. However, whenever I start I get following :
manager@mac03:/srv/home$ aptusgui.py
: No such file or directory
I do not what command line arguments to pass (if any). I just want to get started.
Chetan
@Chetan: the problem is a DOS line-ending in the aptusgui.py file (and aptuscmd.py). I'll post a new kit shortly with the problem fixed. In the meantime, you can either edit the file yourself, or run the commands as "python /path/to/your/aptusgui.py"
Thanks! Its works. Great piece of art.
Add a comment: