Page 1 of 1

Let there be fractals!

Posted: Sun Aug 25, 2013 11:03 pm
by robcfg
Hello everyone!

A couple of days ago I remembered seeing a very simple basic code on the CPCWiki to render a Mandelbrot set, so I thought it would be nice to adapt it for the Dragon.

I haven't seen any fractal program for the Dragon, so I put myself into it, and managed to write a not too complicated basic program that renders both Mandelbrot and Julia sets, in several screen modes and palettes.

As right now, it will take way looong to create an image, I added menu options to save the image to tape or disk.

I'm particularly proud of the color dithering as it looks awesome on the screen!

I created a page in the wiki for the program with the program itself along nice screenshots on different modes. You can go to page by clicking here.

Of course, suggestions are welcome, and I hope you enjoy it!

Regards,
Rob

Re: Let there be fractals!

Posted: Mon Aug 26, 2013 7:56 am
by sixxie
Neat - the dithering really makes all the difference.

Re: Let there be fractals!

Posted: Mon Aug 26, 2013 10:24 pm
by tormod
Just awesome! Love fractals! I remember firing up the Dragon (a few years after the "wild years") to let it draw a fractale fern. Maybe I still have that program on a cassette somewhere. Anyway it was a short BASIC program, and it tooks hours before there was much of a fern to see.

Re: Let there be fractals!

Posted: Thu Aug 29, 2013 6:42 pm
by Sarah
They're fab, well done!

I can remember a fractal listing or two appearing in Dragon User but yours are more impressive than any I've seen before on the Dragon.

Re: Let there be fractals!

Posted: Thu Aug 29, 2013 7:22 pm
by snarkhunter
Quite nice already (rendering times excepted, of course).

Have you got any plans to implement the rendering of Markus-Lyapunov fractals now, then?!
:mrgreen:

Re: Let there be fractals!

Posted: Thu Aug 29, 2013 8:42 pm
by robcfg
Thank you all for the nice replies!

I was actually surprised too when I generated the first one with dithering. Now I'm converting the basic code to other machines just for fun, while I think a way to turn it into asm to generate the images in a decent amount of time.

And yes, just for laughs it would be nice to try to get the Markus-Lyapunov working on a Dragon. Much better on an emulator because we don't want our machines to go in flames :lol:

Re: Let there be fractals!

Posted: Mon Sep 09, 2013 5:52 pm
by jedie
Seems that there is a error in line 1630... Patch:

Code: Select all

- 1630 SAVE N$,VM,VM+6144,VM
+ 1630 CSAVE N$,VM,VM+6144,VM
isn't it?


EDIT: btw. for better usage: Use INKEY$ for the choice questions...
IMHO change the COORDINATE input and let the user just press ENTER for the default's for a full fractal.

Re: Let there be fractals!

Posted: Mon Sep 09, 2013 11:53 pm
by robcfg
Nice suggestion, but I didn't want to make the code more complicated than already is ;)

By the way, the SAVE statement on line 1630 is not an error, it's for saving the image to disk rather than tape. If you have a disk controller attached, it will save the image to the file name you specify.

Re: Let there be fractals!

Posted: Tue Sep 10, 2013 7:38 am
by jedie
robcfg wrote:By the way, the SAVE statement on line 1630 is not an error, it's for saving the image to disk rather than tape. If you have a disk controller attached, it will save the image to the file name you specify.
Ah! I need to add DOS tokens in PyDC ;)