Jump to content
IGNORED

Fractari - Mandelbrot set generator for 8bit Atari


R0ger

Recommended Posts

New program for rendering Mandelbrot set named Fractari was released as part of FLOP 65: http://flop.atariportal.cz/index.en.php

 

It uses scanline GFX mode to get 8 colors, and fast square algorithm for 16, 24 and 32 bits. It then selects the best variant based on zoom.

The goal was to create the fastest possible Mandelbrot set generator. Included presets render from few minutes to 1 hour. The basic overview of the Mandelbrot set takes 24 seconds, with preview in Antic D mode.

 

It renders the image in 4 phases, first phase only renders every 4th pixel. This gives you quick preview and you can continue zooming without waiting for the rest, and it's also used to estimate where more calculation is needed, and where the color of the other pixels can be  just assumed.

 

After the image is rendered, it allows relatively quick change of visualization parameters, things like palette and color scaling, without repeating the calculation.

Other features include:

- 3 different DMA modes for previewing the image, from fastest to best looking

- preset locations to render nice images even if you can't navigate Mandelbrot set at all

- party mode, which just goes through the presets one by one

- and more !

 

I consider this as something of a version 1.0, and I already have tons of ideas for 2.0. Things like built-in help, animation using extended memory and disk operations.

 

Please read detailed description in stand-alone article in FLOP 65. The program supports both PAL and NTSC, and while not tested, it should also work on better CPUs.

 

Nice video about exploring Mandelbrot set, which actually inspired me to make this: https://www.youtube.com/watch?v=riLFpb-PcLs

 

Few images from the program:

 

 

p1.png

p2.png

p3.png

p6.png

Edited by R0ger
  • Like 33
  • Thanks 5
Link to comment
Share on other sites

4 hours ago, kogden said:

That looks pretty awesome.  Will this run on a 48K machine?

 

Well done!

The Flop disk(s) have @R0ger’s write up, which I read last night. I think it requires 64K. I also need to find a way to print out all the options listed in the text! There’s a *lot* going on in that program. 

 

Very, very cool. :)

Link to comment
Share on other sites

4 hours ago, kogden said:

That looks pretty awesome.  Will this run on a 48K machine?

 

Well done!

Sadly no. I use all 64k. 16k is used for storing the depths so refresh of visualization parameters is faster. If it were just demo, it wouldn't be needed, but for playing with it it's quite useful. There is also 8k for last finished picture, which is not very important feature, but that wouldn't be enough. It's actually quite packed atm.

Link to comment
Share on other sites

3 hours ago, Rybags said:

Is that using the Mode E interleaved colour/luma mode?  Looks like good res and plenty of colours.

Not color/luma. That was my initial idea, but for Mandelbrot set you need lot of bright and strong colors. So I tried something else.

First I tried simple 4 color palette where I would have 4 colors directly, and extra 4 colors by combining neighbor colors in scanline or checkerboard fashion.

It works ok, but there is big contrast between these 2 sets. Some colors look solid, and some look scanlined. So I came up with an idea to have 2 different palettes on odd/even lines, where all result colors will be combination of 2 colors, and the palettes are constructed so the brightness difference is about the same. That way all colors looks scanlined to about the same extent.

Here is picture where I experimented with the palettes, not all are used in the final program. Even lines palette is on the left, odd lines palette is on the right, and in between you can see them merged together. Note how some palettes go 'around', like black->red->yellow->green->blue->black, and some go 'there and back again' like black->white->black.

 

palette.png

Edited by R0ger
  • Like 11
Link to comment
Share on other sites

17 hours ago, R0ger said:

New program for rendering Mandelbrot set named Fractari was released as part of FLOP 65: http://flop.atariportal.cz/index.en.php

 

It uses scanline GFX mode to get 8 colors, and fast square algorithm for 16, 24 and 32 bits. It then selects the best variant based on zoom.

The goal was to create the fastest possible Mandelbrot set generator. Included presets render from few minutes to 1 hour. The basic overview of the Mandelbrot set takes 24 seconds, with preview in Antic D mode.

 

It renders the image in 4 phases, first phase only renders every 4th pixel. This gives you quick preview and you can continue zooming without waiting for the rest, and it's also used to estimate where more calculation is needed, and where the color of the other pixels can be  just assumed.

 

After the image is rendered, it allows relatively quick change of visualization parameters, things like palette and color scaling, without repeating the calculation.

Other features include:

- 3 different DMA modes for previewing the image, from fastest to best looking

- preset locations to render nice images even if you can't navigate Mandelbrot set at all

- party mode, which just goes through the presets one by one

- and more !

 

I consider this as something of a version 1.0, and I already have tons of ideas for 2.0. Things like built-in help, animation using extended memory and disk operations.

 

Please read detailed description in stand-alone article in FLOP 65. The program supports both PAL and NTSC, and while not tested, it should also work on better CPUs.

 

Nice video about exploring Mandelbrot set, which actually inspired me to make this: https://www.youtube.com/watch?v=riLFpb-PcLs

 

Few images from the program:

 

 

p1.png

p2.png

p3.png

p6.png

THANKS !!!

 

Played with it, and it is as sweet as it can be.... for an 8-bit 6502, which is really pushing it (!!!)

 

Question: would the drawing process be immune to alternating DMA between ON and OFF (at will, on-the-fly)? I ask because I have the ability to do so, at any time, on my current OS loads (XL/XE r03 and r04), but it seems the OS keyboard handler is being intercepted or bypassed by Fractari.

 

That would mean a 30% reduction of execution time, with the ability to peek intermediate results from time-to-time (!)

  • Like 2
Link to comment
Share on other sites

57 minutes ago, Faicuai said:

THANKS !!!

 

Played with it, and it is as sweet as it can be.... for an 8-bit 6502, which is really pushing it (!!!)

 

Question: would the drawing process be immune to alternating DMA between ON and OFF (at will, on-the-fly)? I ask because I have the ability to do so, at any time, on my current OS loads (XL/XE r03 and r04), but it seems the OS keyboard handler is being intercepted or bypassed by Fractari.

 

That would mean a 30% reduction of execution time, with the ability to peek intermediate results from time-to-time (!)

Well I turning the ROM off just as the program starts, so whatever you have there is simply not there.

You can turn DMA off using M key (only during calculation), there are 3 modes, screen off, Antic D, and Antic E with full kernel. Antic D is about 15% slower compared to nothing, so it's not a huge price for having a preview. I leave the status bar on even in no DMA mode, and PMG is used for showing the current pixel, both of which cost basically nothing.

 

Btw. the calculation itself is done in 160x100 resolution, Antic E is only used to display more colors.

  • Like 2
Link to comment
Share on other sites

2 hours ago, R0ger said:

Well I turning the ROM off just as the program starts, so whatever you have there is simply not there.

You can turn DMA off using M key (only during calculation), there are 3 modes, screen off, Antic D, and Antic E with full kernel. Antic D is about 15% slower compared to nothing, so it's not a huge price for having a preview. I leave the status bar on even in no DMA mode, and PMG is used for showing the current pixel, both of which cost basically nothing.

 

Btw. the calculation itself is done in 160x100 resolution, Antic E is only used to display more colors.

THANKS!

 

You are correct, cycling with M does disable DMA for the most part.

 

Good choice in leaving the bottom-line text status-bar, as it does show a timing-clock.

 

Overall, very, very thoughtfully implemented. KUDOS (!)

 

(a quick sample showing field-blending completely, on actual NTSC-rendering, Y/C output):

 

49DC0981-D68F-41CC-9FE9-D4CC90901BE3.thumb.jpeg.95e953d09e2fd81311e094a23e3a0a11.jpeg

 

What is VERY interesting,though,is when switching to Composite interface, a substantial drop in saturation occurs... sort of the other-way-around effect.

 

Edited by Faicuai
  • Like 1
Link to comment
Share on other sites

11 hours ago, krupkaj said:

madfe a little gif ? Just for fun

fractari2.gif.278bdffcef0400195a8f6ffdd4536233.gif

 

 

Made a little TIP Ani, just for fun ;-)

 

FracAni_OliN_128k.xex: uses Olivier N palette (for NTSC), requires 128k RAM

FracAni_OliP_128k.xex: uses Olivier P palette (for PAL), requires 128k RAM

 

The NTSC version looks strange on the emulator, hopefully it looks better on the real A8. (I do not have any NTSC Ataris)

 

 

FracAni.zip

  • Like 1
Link to comment
Share on other sites

9 hours ago, R0ger said:

Not color/luma. That was my initial idea, but for Mandelbrot set you need lot of bright and strong colors. So I tried something else.

First I tried simple 4 color palette where I would have 4 colors directly, and extra 4 colors by combining neighbor colors in scanline or checkerboard fashion.

It works ok, but there is big contrast between these 2 sets. Some colors look solid, and some look scanlined. So I came up with an idea to have 2 different palettes on odd/even lines, where all result colors will be combination of 2 colors, and the palettes are constructed so the brightness difference is about the same. That way all colors looks scanlined to about the same extent.

Here is picture where I experimented with the palettes, not all are used in the final program. Even lines palette is on the left, odd lines palette is on the right, and in between you can see them merged together. Note how some palettes go 'around', like black->red->yellow->green->blue->black, and some go 'there and back again' like black->white->black.

 

palette.png

Bravo! :)

Link to comment
Share on other sites

41 minutes ago, Keatah said:

Sure you don't got an i7 hiding in there?

There? I must (proudly) say a 1.79Mhz, 0.5Mips 6502, I asure you! (timing is of far-right of the bottom text bar):

 

FA413657-BFF7-4D58-876B-764A18A9BDBF.thumb.jpeg.4f666b2341377f1235541f5cd3c8bada.jpeg?

 

But here.... Mhmmm... That's my dual-socket, (x1) 22 Core (44-Threads) darkside.... of pure Broadwell-EP goodness! ?

 

8FC1A12C-20EF-4C61-88AA-DC35E90EA057.thumb.jpeg.ccbe9af78010f8b5a3e5c7f36b81f6a4.jpeg

 

And on the living room, on large flat-panel screen / TVs, it is all about emulation with Altirra... You simply can't beat the sound quality and chroma. resolution you can get from it, plus its inherent all-in-one superiority!

 

Cheers!

Edited by Faicuai
  • Like 4
Link to comment
Share on other sites

Well yes, it's just a gimmick. It's not very good for real 'browsing'. Where it excels is background playing. Like when you are at a party, talking with people .. and you want something nice to be happening on the screen. 10-30 minutes rendering time is just about perfect for that.

 

  • Like 1
Link to comment
Share on other sites

6 hours ago, snicklin said:

I checked out this great Mandelbrot implementation together with Altirra and the F1 button. I am however impressed with the calculation time as it beats that program in New Atari User all those years ago.

It's quite amusing to run Altirra at 3500-something FPS. The rendering flies onto the screen. Foom foom foom foom.

 

3 hours ago, R0ger said:

Well yes, it's just a gimmick. It's not very good for real 'browsing'. Where it excels is background playing. Like when you are at a party, talking with people .. and you want something nice to be happening on the screen. 10-30 minutes rendering time is just about perfect for that.

I thought I was the only one doing that?!?

 

And yes for real browsing and deep-dives I use either Xaos or Visions of Chaos. OR even fractint if I'm nostalgic for the 286-486 era. They're free and I'm a cheap bastard.

 

Link to comment
Share on other sites

5 minutes ago, Synthpopalooza said:

 

This is awesome.

 

Feature suggestion:  option to shake the screen up and down a scanline.  On NTSC this really blends the colors well.

That might be fine with CRTs and last-generation flat panels that still have analog inputs. It might possibly confuse any modern pure digital display that requires a converter/line-doubler to get HDMI output. 

Link to comment
Share on other sites

Also:  I came up with a method once to do a bitmap in ANTIC 4 mode.  You have to do a character set DLI every 3 character lines, and address the character memory as a bitmap, like a commodore 64 bitmap.  it might give you a few extra colors to work with.

 

Then of course there's always initiating GTIA 10 every 2nd scanline.  you lose half your resolution on those lines but gain extra colors.  With the blending techniques you should get about 30 colors.

  • Like 1
Link to comment
Share on other sites

42 minutes ago, Synthpopalooza said:

 

This is awesome.

 

Feature suggestion:  option to shake the screen up and down a scanline.  On NTSC this really blends the colors well.

It's there. F key. Does anyone read the manual ? ?

 

35 minutes ago, Synthpopalooza said:

Also:  I came up with a method once to do a bitmap in ANTIC 4 mode.  You have to do a character set DLI every 3 character lines, and address the character memory as a bitmap, like a commodore 64 bitmap.  it might give you a few extra colors to work with.

 

Then of course there's always initiating GTIA 10 every 2nd scanline.  you lose half your resolution on those lines but gain extra colors.  With the blending techniques you should get about 30 colors.

The character mode idea is interesting. And I have kernel anyway. There still would be conflicts, but I guess they could be minimized by palette design.

GTIA mode on the other hand doesn't seem very useful to me. Note this is not they usual luma / chroma system. All lines use high saturation colors with various brightness. Luma / chroma system colors are washed out compared to this, and the resolution is bad as it is.

Edited by R0ger
  • Like 2
Link to comment
Share on other sites

I was thinking the 9 color GTIA mode, not the monochrome.  You can vary the PF colors like you do already, plus there are the P0-P3 and PF3 colors to play with too.

 

What you would need to do is maybe put in a color change for BAK so it becomes a color on the mode 10 lines tho.

 

Again tho, the resolution is spotty.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...