2D Fractal with GLSL

Hi,

here are my projects http://www.lichtundliebe.info/projects/projekte.html.



Here is my 2D fractal program: http://www.lichtundliebe.info/projects/2DFractal/2DFractal.jnlp and the code http://www.lichtundliebe.info/projects/2DFractal.zip programmed with jme 2.0 (http://www.lichtundliebe.info/projects/jME2.zip, 68 MB).

At the title bar, you see, if the program is in speed or precision mode. In speed mode, it uses a simple shader to calculate Julia or Mandelbrot. In precision mode, it uses a special shader with fixed point arithmetics with the format 10bits.70bits. These are 80 bits consisting of 8 floats. Of a float, I use 10 bits for the number and the rest of the mantissa for addition or multiplication overflow.

If there are more than 100 iterations, the values are buffered in textures using multipass texturing for the next 100 iterations.

With a mouse click you zoom in, with the space key you zoom out. If you have no deep zoom, the c value of Julia fractals can be changed in real time.

If you zoom in, the iterations will be increased using a fictive formula. If you uncheck “Adjust iterations”, you can insert the value manually.



You need OpenGL 2.0, the Shader Model 3.0 and 128 bits floating point textures support.



Have fun with it!



Best,

Andreas

Hi,

with CamStudio, I produced a small video: http://www.lichtundliebe.info/projects/videos/MandelbrotJulia.wmv. It has 8 MB.



Best,

Andreas

VERY nice. Thank you for posting the video. I tried running your application also earlier, but was prompted with a message telling my hardware does not meet the requirements.



Is the depth you can go pretty much infinite or… is there a limit to it?

Hi,

here is the video on youtube: http://www.youtube.com/watch?v=1x8_gRtnB_s. Yes, there is a limit. For infinity, you need infinite precision and for that infinite memory. It’s more precise than normal 32 bit floats in precision mode. With normal floats, I was able to zoom until 10^4 and now I can zoom until 10^18.



Best,

Andreas

Thats cool! Nice job.

Yeah that's pretty cool! Fractals can be pretty interesting

Hi,

was anyone with a nvidia >=6000 able  to execute my program?



Andreas

got an update message for nvidia 7600 gt

Updated drivers - still no joy

Ok, I will modify my program.

Hi,

now, the exception message + stack trace will be displayed at the message window. Could you please start my program, again and post the errors?



Best,

Andreas

Hi,

a friend could execute this program with his nvidia 6200, what he could not do before.



Best,

Andreas

I too have a nvidia 7600 gt, seems to work fine now (although I did not test it before you modified your program).

Great! Thanks!

Hi,

I would like to know, if this program also is running with an ati x1x00 card in the precision mode (click 5-6 times at the fractal). A friend with a mac and a x1600 told me, his computer was crashing and I would like to know, if this is os/driver or card specific.



Best,

Andreas

Andreas said:

Hi,
I would like to know, if this program also is running with an ati x1x00 card in the precision mode (click 5-6 times at the fractal). A friend with a mac and a x1600 told me, his computer was crashing and I would like to know, if this is os/driver or card specific.

Best,
Andreas


I have an 8800GT and something wierd happens after five zoom's. The whole computer hangs for like 10s then the entire screen flashes and the java application just displays some wierd blue lines. If I click more the entire monitor display flashes and more blue lines are displayed in the application. Some operation is definitely screwing with the graphic card.

Hi,

I just found out, at the precision mode, the instruction count exceeds 65536. That's the cause for crashing. Sorry.

I will reduce the per step calculated iterations. Hope, that will solve the problem.



Best,

Andreas

Hi,

I updated my program. Please test, again.



Andreas

Runs very slow on school computer, XP Pentium 4 (3 GHz), Radeon X300.

Takes about 30-60 seconds to get an image on the screen, it's mostly unstable otherwise.

Hi,

x300 supports the shader model 2.0, only. But, you need the shader model 3.0. Thats why, I wrote about x1x00 cards (>=x1000).



Andreas