PHP Classes

Mandelbrot: Generate Mandelbrot fractal images

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2005-03-17 (12 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,006 All time: 3,533 This week: 614Up
Version License Categories
mandelbrot 1.0GNU General Publi...Algorithms, Graphics
Description Author

This class can generate Mandelbrot and Julia fractals images using arbitary precision math using the PHP BC extension.

The class can be configured to set many different fractal parameters and the size of the output image, which is saved to a file in the PNG format using PHP GD extension.

Name: Zafar Iqbal is available for providing paid consulting. Contact Zafar Iqbal .
Classes: 8 packages by
Country: Greece Greece
Age: 43
All time rank: 2642 in Greece Greece
Week rank: 111 Up2 in Greece Greece Equal
Innovation award
Innovation award
Nominee: 2x

PHP Mandelbrot Class

	A class to visualize the Mandelbrot and Julia fractals using arbitary precision math.

	Some examples provided showing basic usage.

Public Methods
	setBounds($min_x,$max_x,$min_y,$max_y)	Complex plane dimensions
	setBoundsAlternate($mid_x,$mid_y,$size)	Complex plane dimensions
	setIterations($i)			Maximum iterations
	setImageSize($i)			Image size	
	setJulia($i,$j)				Julia point
	loadParameterFile($filename)		Load parameter file
	save()					Save image and parameter file

	Class constructor can take a true|false parameter which controls verbose mode.
	Verbose mode outputs current horizontal (y-axis) line that is being computed.
	Precision is auto-magically controlled using a hand-rolled algorithm.
	Precision has been tested to deep zoom levels but extreme depth requires more
	RAM and CPU power.
	Complex plane bound methods expect strings as input parameters, e.g. "2.5"
	No method to override colour map. If you need to then you must edit class source.
	Best advice for creating stunning fractals is to use a standalone fractal program
	for example fractint to get rough idea of complex plane dimensions or find a fractal
	parameter file archive and then use this class to produce high-definition images.
	Of course, leave your computer running for a night or two ;)

  • test-2.png
  Files folder image Files  
File Role Description
Plain text file class-mandelbrot.php Class Main Class
Plain text file example1.php Example 1st Example
Plain text file example2.php Example 2nd Example
Plain text file example3.php Example 3rd Example
Plain text file example4.php Example 4th Example
Plain text file readme.txt Doc. Read Me
Accessible without login Image file test-1.png Output Sample Image

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:3,533
This week:614Up