3 ms·
Drawing fractals with PostgreSQL
- Xophmeister 13y agoBlowing my own trumpet, somewhat, but here's my write up of creating the Mandelbrot set in Oracle 11g (which I'm forced to use at work) SQL: http://xoph.co/20130917/mandelbrot-sql/ http://xoph.co/20130917/mandelbrot-sql/
- joe_the_user 13y agoIs there any advantage to using SQL or PostgreSQL here or this one of those "just to show we can" exercises.
- ajtaylor 13y agoI'd say it's more a "because we can", but isn't it interesting anyway? Exposure to new ideas, or new ways to implement existing ideas, is usually interesting.
- quassnoi 13y agoThere is no advantage: the modern GPU can build thousands of full page resolution fractals per second while SQL takes seconds to produce a hundred by hundred characters ASCII art. It's just a New Year SQL picture post, something I do every new year on my blog.
- penrod 13y agoI initially read the title as "Drawing fractals with PostScript," which is also fun. Here's a fractal fern in ps: /t0 [ .85 -.04 .04 .85 0 1.6 ] def /t1 [ .2 .23 -.26 .22 0 1.24] def /t2 [-.15 .26 .28 .24 0 0.44] def /t3 [0 0 0 .16 0 0 ] def /rmax 2 31 exp def /map {rand rmax div dup .81 lt {pop t0} {dup .90 lt {pop t1} {.99 lt {t2} {t3} ifelse} ifelse} ifelse} def /plot {2 copy .001 dup rectfill} def 290 50 translate 70 dup scale 0 0 2000000 {plot map transform} bind repeat showpage