Re: The NickFrac screensaver, or How I Broke My Brain
- Posted by prickle Aug 05, 2009
- 1191 views
Nick, how hard would it be for the control-S command to wait till the fractal is complete before saving? I see great patterns coming up but either hit Ctrl-S too late or earlier than I'd like. Just a thought ... you can tell my work is dropping off a little ... ho hum.
Andy
Hi Andy. The reason I did it like that is because the program doesn't use any backing store or screen buffer. The output of the engine is drawn straight to the visual and is destroyed if anything moves over the top of it, like another window or progress bar or something. Fractals went faster that way. This is why the screen is "captured" with little red bars rather than the image being instantly available to save.
I do not have a good knowledge of the Windows API, there may be some much better way to do this. What I think it means though is any visual feedback we give the user at the point they press Ctrl-S will damage part of the image. Not wanting that to happen, we need to simply sit and wait for the fractal to finish before capturing it. Wondering what's going on, the user presses the key again. and again, mashing the keyboard in a frenzy of impatience. Suddenly, dozens of save-as windows appear and the computer crashes. Well, maybe not, but I can't think of a good way. Any ideas?
What I did back when I still used Windows was crank the iterations up by a factor of ten or more on the chaotic fractals like the IFSs and the Strange types so they ran much longer to give me a a better chance of capturing one I liked and turned all the boring ones off. I was thinking of updating the defaults, they were set back in '02 when life was slower but I keep forgetting. Each chaotic fractal type was intended to linger for up to a minute. On a modern machine they probably skip by a bit too quick.
Hmm. not sure. Perhaps if I captured every fractal when it was finished and kept the last ten in a directory somewhere?
Here's to not working,
Nick