Page 1 of 1

Mandelo

Posted: Tue Jun 04, 2024 10:19 am
by yock1960
I'm not quite sure what section this belongs in....'Useless Apps' perhaps,
but that's not a current choice. This is a re-visitation to the Mandelbrot
and Julia Sets, that I have coded previously, but let's face it, 8mhz and
software floating point is just too slow for casual use, even when coded
in assembly.

I got the idea for this from working on several example programs in my
Pascal compiler (Pascal-iSh), which this is not written in, but given that
Pascal-iSh code is somewhat slow to execute, compared to most compiled languages,
the resolution would need to be quite low! One thing led to another, I revisited
SlithyMatt's low res character mode Mandelbrot, which does plot 'reasonably' fast
but is a bit too low res for my taste, plus, while using the alphabetic characters
does have a charm of it's own, it wasn't for me.

In the end, I borrowed code from a demo program in Prog8, which had similarities
to Matt's code, bumped it up to Screen mode 0 (80x60) and added more frills that
I had used in my previous versions, to cook this up.

I think this is the 'sweet spot' for Mandelbrot on the X16! Okay, it's not that
sweet, but unless you go overboard on iterations, most screens plot in under 10
minutes (cough..cough) and for 64 or fewer iterations, typically under 3 minutes, with
the added benefit, that if you are a Light Brite fanatic, as well as a Mandelbrot
fanatic, you can use the output as a template for creating Lite Bright art!

Try It Now!
mandelo.prg
(7.67 KiB) Downloaded 88 times

Re: Mandelo

Posted: Tue Jun 04, 2024 6:49 pm
by desertfish
The alternate palettes is a nice touch. Maybe you can even make it cycle smoothly ?

Re: Mandelo

Posted: Wed Jun 05, 2024 10:11 pm
by yock1960
desertfish wrote: Tue Jun 04, 2024 6:49 pm The alternate palettes is a nice touch. Maybe you can even make it cycle smoothly ?
What do you mean by 'cycle smoothly'?

Re: Mandelo

Posted: Wed Jun 05, 2024 10:40 pm
by ahenry3068
yock1960 wrote: Wed Jun 05, 2024 10:11 pm
desertfish wrote: Tue Jun 04, 2024 6:49 pm The alternate palettes is a nice touch. Maybe you can even make it cycle smoothly ?
What do you mean by 'cycle smoothly'?
He means to do a palette fade cycling the completed Mandelbrot set through the various colors. Done correctly it makes your image look animated though the only thing actually changing is the Palette registers. The QBasic Mandelbrot that came with DOS does that I believe.

Re: Mandelo

Posted: Thu Jun 06, 2024 10:09 am
by yock1960
ahenry3068 wrote: Wed Jun 05, 2024 10:40 pm
He means to do a palette fade cycling the completed Mandelbrot set through the various colors. Done correctly it makes your image look animated though the only thing actually changing is the Palette registers. The QBasic Mandelbrot that came with DOS does that I believe.
Okay, I think I might know what that is and it would be an interesting effect, but the purpose of the different palette combos here is to add contrast to highlight the different structure within the plot. Some of them are repetitive or uninteresting, but I lack the patience to make all of them 'interesting'!

Re: Mandelo

Posted: Thu Jun 06, 2024 11:48 am
by ahenry3068
yock1960 wrote: Thu Jun 06, 2024 10:09 am
ahenry3068 wrote: Wed Jun 05, 2024 10:40 pm
He means to do a palette fade cycling the completed Mandelbrot set through the various colors. Done correctly it makes your image look animated though the only thing actually changing is the Palette registers. The QBasic Mandelbrot that came with DOS does that I believe.
Okay, I think I might know what that is and it would be an interesting effect, but the purpose of the different palette combos here is to add contrast to highlight the different structure within the plot. Some of them are repetitive or uninteresting, but I lack the patience to make all of them 'interesting'!
You would probably want to stay with the colors you did pick. Just "shift" them in a loop move the first entry to the second, 2nd to the 3rd, 3rd to the 4th....etc.. Last color used to the 1st. Do that continuously in a loop after the Mandelbrot is done and your image looks like's its "flowing"......

Re: Mandelo

Posted: Thu Jun 06, 2024 11:49 am
by ahenry3068
yock1960 wrote: Thu Jun 06, 2024 10:09 am
ahenry3068 wrote: Wed Jun 05, 2024 10:40 pm
He means to do a palette fade cycling the completed Mandelbrot set through the various colors. Done correctly it makes your image look animated though the only thing actually changing is the Palette registers. The QBasic Mandelbrot that came with DOS does that I believe.
Okay, I think I might know what that is and it would be an interesting effect, but the purpose of the different palette combos here is to add contrast to highlight the different structure within the plot. Some of them are repetitive or uninteresting, but I lack the patience to make all of them 'interesting'!
You would probably want to stay with the colors you did pick. Just "shift" them in a loop move the first entry to the second, 2nd to the 3rd, 3rd to the 4th....etc.. Last color used to the 1st. Do that continuously in a loop after the Mandelbrot is done and your image looks like's its "flowing"......

My "HANGMAN" splash screen uses a similiar effect for the title text.

Re: Mandelo

Posted: Thu Jun 06, 2024 3:21 pm
by yock1960
ahenry3068 wrote: Thu Jun 06, 2024 11:49 am
yock1960 wrote: Thu Jun 06, 2024 10:09 am
ahenry3068 wrote: Wed Jun 05, 2024 10:40 pm
He means to do a palette fade cycling the completed Mandelbrot set through the various colors. Done correctly it makes your image look animated though the only thing actually changing is the Palette registers. The QBasic Mandelbrot that came with DOS does that I believe.
Okay, I think I might know what that is and it would be an interesting effect, but the purpose of the different palette combos here is to add contrast to highlight the different structure within the plot. Some of them are repetitive or uninteresting, but I lack the patience to make all of them 'interesting'!
You would probably want to stay with the colors you did pick. Just "shift" them in a loop move the first entry to the second, 2nd to the 3rd, 3rd to the 4th....etc.. Last color used to the 1st. Do that continuously in a loop after the Mandelbrot is done and your image looks like's its "flowing"......

My "HANGMAN" splash screen uses a similiar effect for the title text.
So, shift by 1 color at a time, instead of the 16 at a time that it currently does. I may give it a try.

Re: Mandelo

Posted: Thu Jun 06, 2024 4:48 pm
by ahenry3068
yock1960 wrote: Thu Jun 06, 2024 3:21 pm
ahenry3068 wrote: Thu Jun 06, 2024 11:49 am
yock1960 wrote: Thu Jun 06, 2024 10:09 am

Okay, I think I might know what that is and it would be an interesting effect, but the purpose of the different palette combos here is to add contrast to highlight the different structure within the plot. Some of them are repetitive or uninteresting, but I lack the patience to make all of them 'interesting'!
You would probably want to stay with the colors you did pick. Just "shift" them in a loop move the first entry to the second, 2nd to the 3rd, 3rd to the 4th....etc.. Last color used to the 1st. Do that continuously in a loop after the Mandelbrot is done and your image looks like's its "flowing"......

My "HANGMAN" splash screen uses a similiar effect for the title text.
So, shift by 1 color at a time, instead of the 16 at a time that it currently does. I may give it a try.
Your still going to use your 16 colors. But after the image is done your going to shift their palette entry's rather than the color index value.

Quick Example
COLOR 1,0
CLS
PRINT "WHITE COLOR..."
VPOKE 1,$FA02,0
VPOKE 1,$FA03, $F
PRINT "OR MAYBE I'M REALLY RED"