
High-Resolution Mandelbrot in Obfuscated Python - yaph
http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python/
======
jrockway
One thing that's nice about the Mandelbrot set is that you can calculate each
pixel independently of all the other pixels. This means if you have 8 CPUs,
you can split the image into 8 parts and render it that way.

I apparently decided to try this out about 4 years ago. Here's the result:
[https://gist.github.com/jrockway/291074](https://gist.github.com/jrockway/291074)

Still slow. Need to run this on some machines at work :)

~~~
tel
Or convert it to Accelerate and kick it out on a GPU... :)

~~~
Nursie
That was my first OpenCL project. I managed to make it render just slightly
slower than on the CPU, which for a first time I consider a success.

------
bsaul
A bit of topic, but the blog conclusion made me wondered if anyone would one
day expose code in a museum.

Any people who've seen real top level code know there is a kind of beauty or
at least aesthetic in very correct code, so why not put them on a frame and
expose them. Same could be said of some really important mathematic or physic
formulas, but they're sometimes short and their meaning really is obscure.
Whereas code is at least partially written in human language, which would make
such an exhibit still understandable by everyone.

~~~
cing
I'm not sure about "code as art" but Bernar Venet uses a lot of mathematics in
his works. [http://nicolaanthony.wordpress.com/2012/11/18/a-perfect-
synt...](http://nicolaanthony.wordpress.com/2012/11/18/a-perfect-synthesis-of-
art-and-mathematics-bernar-venet-in-singapore/)

He even framed an astrophysics paper once in the Centre Pompidou,
[http://scienceblogs.com/cognitivedaily/2007/06/08/euroupdate...](http://scienceblogs.com/cognitivedaily/2007/06/08/euroupdate-2-is-
science-art/)

------
itcmcgrath
I've been looking for more geeky art to put up in my home office (like their
version on CafePress with the code in the image -
[http://www.cafepress.com/preshing.571735472](http://www.cafepress.com/preshing.571735472)).

Does anyone know others like that?

~~~
stevewilhelm
The Utah Tea Pot is a classic image
[http://en.wikipedia.org/wiki/Utah_teapot](http://en.wikipedia.org/wiki/Utah_teapot)

Here is a good example
[http://upload.wikimedia.org/wikipedia/commons/5/5f/Utah_teap...](http://upload.wikimedia.org/wikipedia/commons/5/5f/Utah_teapot_simple_2.png)
or

[http://www.computerhistory.org/revolution/computer-
graphics-...](http://www.computerhistory.org/revolution/computer-graphics-
music-and-art/15/intro/554)

~~~
cpach
It’s also available in porcelain :)

[http://www.unfold.be/pages/5/items/85](http://www.unfold.be/pages/5/items/85)

------
clebio
> If you’re willing to leave the script running for a few hours, you can
> increase the image resolution on line 8. (Just make sure the width is
> divisible by 4.)

You can make a _lower_ resolution version too. I used:

    
    
        )  ;v,      x=1024, 800;C=range(v*x

which fakes the 4-width with a space before 800, and it worked fine:
[http://i.imgur.com/c9ossnw.png](http://i.imgur.com/c9ossnw.png)

I like this use of obfuscation a lot. Kudos to the author. (EDIT: Code format)

------
kylek
Neato, reminded me of the RSA dolphin
([http://e-privacy.winstonsmith.info/2007/2005/2002/munitions/...](http://e-privacy.winstonsmith.info/2007/2005/2002/munitions/documents/rsafin))

------
mortenlarsen
I humbly tip my hat to the author. And hope to create a hack, half as inspired
in my lifetime.

