3 ms·
I once wrote a PostScript program that generates Mandelbrot, tuned it so that it finishes up in reasonable time, and sent to some old laser printer. On next day
by YjSe2GMQ 7y ago
I once wrote a PostScript program that generates Mandelbrot, tuned it so that it finishes up in reasonable time, and sent to some old laser printer. On next day morning the machine finished up churning numbers and spat out a known picture.
BTW: .ps (PostScript) is a fun little stack based language, similar to JVM. Document is simply the result of the program execution. You can program it by hand, though I do not recommend anything large.
- RBerenguel 7y agoIt's a very fun exercise when you are starting with PostScript... and indeed, unless you are familiar with Forth or any other stack based language, it's a big pain to write. A long time ago I wrote a very short "tutorial" [1] on my blog (which right now looks very bad due to change in stylesheets that don't have translated well... The code for the Mandelbrot set there is broken (due to googlecode dying), but I just moved from my local copy to a gist [2]. And the code for the Christmas postcard (with Koch snowflakes and Gosper curves) is here [3]. It is commented, but not sure how useful it can be. [1] https://www.mostlymaths.net/2008/12/quick-postscript-programming-tutorial.html https://www.mostlymaths.net/2008/12/quick-postscript-program... [2] https://gist.github.com/rberenguel/9a5239034cafdeaabdf6654446521254 https://gist.github.com/rberenguel/9a5239034cafdeaabdf665444... [3] https://gist.github.com/rberenguel/38f5106fee2a795be45d6a33532fd0e4 https://gist.github.com/rberenguel/38f5106fee2a795be45d6a335... Edit: having a blog with posts from 10 years ago you want to reference is painful... Broken links, grammar errors, unclear writing, typos...
- rbanffy 7y agoIt was really cool in the early 80s became the printer was often the most powerful computer in the office. Multi-megabyte memories and fast RISC processors with FPUs were not uncommon.
- manifestsilence 7y agoI used to work in a proprietary concatenative/stack language that was used for the GUI front-end for medical software. I wrote a Mandelbrot in it that used zero variable names, just two functions with a recursive call. It was beautifully terse and dense. That sort of language is really satisfying for that sort of problem.
- pvg 7y agoIt's 'similar to [the] JVM' in that the word 'stack' pops up when either is described. In most substantial ways, they are quite dissimilar.
- fanf2 7y agoI managed to get an Apple LaserWriter II to render a Mandelbrot set very nicely at 300dpi in reasonable time by tracing the boundaries of a few select level sets: much fewer points to examine so much faster.