TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Drawing fractals with PostgreSQL

51 pointsby bacarterover 11 years ago

3 comments

Xophmeisterover 11 years ago
Blowing my own trumpet, somewhat, but here&#x27;s my write up of creating the Mandelbrot set in Oracle 11g (which I&#x27;m forced to use at work) SQL:<p><a href="http://xoph.co/20130917/mandelbrot-sql/" rel="nofollow">http:&#x2F;&#x2F;xoph.co&#x2F;20130917&#x2F;mandelbrot-sql&#x2F;</a>
penrodover 11 years ago
I initially read the title as &quot;Drawing fractals with PostScript,&quot; which is also fun. Here&#x27;s a fractal fern in ps:<p>&#x2F;t0 [ .85 -.04 .04 .85 0 1.6 ] def &#x2F;t1 [ .2 .23 -.26 .22 0 1.24] def &#x2F;t2 [-.15 .26 .28 .24 0 0.44] def &#x2F;t3 [0 0 0 .16 0 0 ] def<p>&#x2F;rmax 2 31 exp def<p>&#x2F;map {rand rmax div dup .81 lt {pop t0} {dup .90 lt {pop t1} {.99 lt {t2} {t3} ifelse} ifelse} ifelse} def<p>&#x2F;plot {2 copy .001 dup rectfill} def<p>290 50 translate 70 dup scale 0 0 2000000 {plot map transform} bind repeat showpage
joe_the_userover 11 years ago
Is there any advantage to using SQL or PostgreSQL here or this one of those &quot;just to show we can&quot; exercises.
评论 #7003553 未加载
评论 #7003351 未加载