Shop Forum More Submit  Join Login
Mandelbrot Set Apo Plugin by Lu-Kout Mandelbrot Set Apo Plugin by Lu-Kout
Click Download for the zip file containing a DLL and source code for an example Mandelbrot Set Apophysis Variation plugin. Place the included DLL in a Plugins directory located just under the main Apo working directory (where the Apophysis .exe resides).

[EDIT (13 July 2007): Fixed memory manager issue which was causing invalid memory access errors for Delphi-compiled DLLs!]

If you have a Delphi compiler, you can build the variation directly into Apophysis, make a plugin DLL for Apophysis, and/or build a version of Apophysis which includes the plugin handler so you can make & use new variations without having to rebuild Apophysis each time. (The latter option requires the use of the Plugin Handler source code, varGenericPlugin.pas, which may be downloaded from [link]). NOTE: the source code has not yet been updated there to fix the memory manager problem!

Note that I'm not responsible for whatever Apo or your computer does (or doesn't do) when you use this code... ;)

Image and code © 2007 Jed Kelsey. Code may be modified and distributed in accordance with Apophysis source code guidelines.
Add a Comment:
Quantum-Dragonfly Featured By Owner Aug 23, 2010  Student General Artist
1389AD Featured By Owner Apr 18, 2009   Digital Artist
This may be a stupid question, but what are the cx and cy parms supposed to do?
samsende Featured By Owner May 1, 2008
thank you for this :)
Mezzaninex Featured By Owner Aug 9, 2007
It looks good :). There will need to be some speedups for it to be practical though.

I found a small bug while trying to "zoom" in. I was setting xmin, xmax, ymin, and ymax ever closer to each other to zoom, and I accidentally overshot and made xmax smaller than xmin. Apophysis stopped responding.

live2b Featured By Owner Aug 8, 2007
Thank you!!
LadyLyonnesse Featured By Owner Aug 8, 2007
Thanks so much for sharing this. I'm sure to have lots of fun with it!
esintu Featured By Owner Jun 25, 2007  Hobbyist Digital Artist
Mandelbrots in Apo?! :w00t:
can't wait to be able to use this :boogie:
Lu-Kout Featured By Owner Jul 8, 2007
You should be able to now, with Apo 2.06! (Just create a Plugins folder below your Apo installation directory (where Apophysis206.exe resides) and put the plugin there. It should show up in your list of available variations.
MichaelFaber Featured By Owner Jun 22, 2007
I got this to work with your newer code :) It is really slow. I guess that is expected though

Do you know any free compilers for windows that i could use to make dlls? I'd like to get away from using Delphi
Lu-Kout Featured By Owner Jun 23, 2007
Yep, it's pretty slow. Especially if you turn on the "outline" mode ("skin"<1) or make "invert" nonzero :). Your best bet is to use small windows and low quality/number of iterations while manipulating it, and only turn it up for final touches before you're ready to start rendering... which of course is not going to be particularly speedy... Keeping the number of Mandelbrot Set variations small in your flame is a good idea. :D

Part of what makes it so slow is that it's iterating an equation lots of time for every random point it picks -- and then potentially throwing it out anyway and picking a new point to start the process over.

The points inside the Mandelbrot set are the ones that take lots of time (iterations starting within that set never "escape"). Given that we know the general shape of the set, we could speed things up considerably by masking out these known regions and not require iterations there...

The "outline" and "invert" options were added at the last minute based on recommendations from :devDragonWinter (they were good suggestions), and the extra features required computations that make things even slower... I haven't yet tried to optimize the code or use inline assembly, which might help things a bit.


As for free compilers, there are a number of options to choose from. If you're interested in C/C++, you might try checking out the Borland/CodeGear "Turbo Explorer" or Microsoft "Express" versions of their compilers. Things may have changed since I checked them out last, though... :shrug:

Microsoft and Borland used to provide a free download of recent command-line (no IDE) compiler tools for a time. I haven't checked on them for a while, though, since CodeGear took over Borland's line of compiler IDE/toolsets. Intel provided a C compiler for a time also, I believe. (maybe they are all still available?)

Gnu gcc is another good choice supporting cross-platform development in C/C++/java/FORTRAN/Ada/... It is inherently a Unix-based compiler, supporting Linux/Mac OS X & other unix-like operating systems, with support for Windows provided by MinGW or Cygwin.
djgpp is another free C/C++ compiler and there are doubtless a number of others.

Then there are all the other languages, many of which have free compilers with the capability to create plugin DLLs...
MichaelFaber Featured By Owner Jun 24, 2007
I'm giving Visual C++ Express 2005 a go to see how it works. :)

I had an idea a while ago how to make a Mandelbrot - slight difference from the way you made yours. I may send you some code if i can get it to work, and if it works the way i imagine
Lu-Kout Featured By Owner Jun 24, 2007
Sounds great! Let me know what you think about the compiler also -- I've been considering moving forward from my good ol' MSVC++6 for a while...
DobbyKnits Featured By Owner Jun 21, 2007  Hobbyist General Artist
I don't understand coding enough to put your great efforts to good use, but I do love the image at upper left. It looks like a Valentine. :) :love:

Thanks for sharing your creativity and hard work with everyone here at :devart: :w00t: :#1: :winner:
Lu-Kout Featured By Owner Jun 22, 2007
Thanks! Hopefully the plugin manager gets integrated into Apo soon so you'll be able to use these and other new variations without needing to do any coding at all (and be able to mix and match variations without having to get different versions of Apo)!

Thanks for the encouragement!
DobbyKnits Featured By Owner Jun 23, 2007  Hobbyist General Artist
You're so very welcome. Thanks for coming to :devart:. :w00t:

(LOVE the new avatar, by the way. If I didn't know better, I'd swear I recognize all those folks. :laughing:)
Add a Comment:


Submitted on
June 21, 2007
File Size
34.7 KB


12,231 (1 today)
54 (who?)
2,563 (1 today)