Mandelbrot library

agraham

Expert
Licensed User
Longtime User
In response to another thread, and for a bit of fun and to revisit the past, I have knocked up this library that will draw the Mandelbrot set on a bitmap provided to it. This version allows you to supply the colour visualisation to the Mandelbrot object as a two-dimensional array so you can play with colour mapping.
 

Attachments

  • Mandelbrot1.0.zip
    6.5 KB · Views: 105

Erel

B4X founder
Staff member
Licensed User
Longtime User
:)

fractal.png
 

Zenerdiode

Active Member
Licensed User
Andrew,

Thank you so much for this brilliant library. As I mentioned in the original post, it has renewed my interest the artistic properties of mathematics.
I was going to ask you about changing the colours (as I always like the cardioids to be black) but you've already done it!

Christopher

p.s. They draw just a little bit quicker than the days of using the 'Beeb'. :icon_clap:
 

Zenerdiode

Active Member
Licensed User
Hello Andrew,

I don't know if I'm the only one using this library - but I love it anyway!

On compiling, I'm getting a CS0227 error. I've now stumbled accross your fix here for your BytesConverter library and applied the fix to this library's .cs file and it now works fine.

Incidentally, what's 'unsafe' code all about?

Many thanks for your untiring assistance :)
 

agraham

Expert
Licensed User
Longtime User
"Unsafe" tells the C# compiler to allow the use of pointers which otherwise it would not allow. In a managed code context pointers are unsafe as they potentially allow code to access any part of memory and potentially crash the application if the code alters something it shouldn't.
 
Top