
Donut math - How donut.c works - dmuino
http://a1k0n.net/2011/07/20/donut-math.html
======
a1k0n
In a highly technical post like this I'm never sure how well I'm explaining
it. I tried to keep things at the high school trig/algebra II level for this
one. I've proofread it a billion times now but is there anything I can
clarify?

~~~
lachenmayer
I think I discovered a tiny problem in your 'relative proportions' formula
picture. you have

    
    
        y'   y
        -  = -
        z'   z'
    

in the first line. The z' on the bottom right should be just a z, right? Other
than that, this is perfectly clear, and I understood it even though I just
came out of high school and haven't started college yet! Absolutely fantastic
work!

EDIT: Fraction format

~~~
a1k0n
Oops. Actually it's not a z' in the denominator in the second fraction, but a
comma following the fraction bar. That's confusing; I have removed it. Thanks!

------
mrpollo
I'm starting to grow even more jealous, this guy has some serious knowledge of
his craft

------
acangiano
Would you really need to see a resume before hiring this guy?

~~~
a1k0n
Anecdotally, yes.

~~~
dmuino

      <resume>
        http://a1k0n.net/
      </resume>

~~~
abjr
If you haven't done it yet, click the code on the bottom of that page :)

~~~
gabebw
A slightly unobfuscated version of that code:

    
    
      counter=0;
      pointer;
      main(){
        while(counter<641){
          for(pointer=0;
              "##K#8(38D-##C]L5870.X7\\M_b;90\\"
              "MC-M/NZGB6Q,I0VGB6a0FbN<VG.6Q\\bNb7^@`X=N@`XQaOVX:^]NX=:Z8PY]B`:>P"
              "NY8^$#SM):XA"[counter/6]-35>>counter++%6&1;
            pointer++);
          putchar(" _/\\\n,`)('<-"[pointer]);
        }
      }

------
kqr2
If you like deconstructing obfuscated c, then you may also enjoy _Obfuscated C
And Other Mysteries_ by Don Libes. In addition to coding advice, it looks at
some of the top entries from the Obfuscated C Contest, 1984-1991.

<http://www.amazon.com/gp/product/0471578053/>

Also appears to be available as a reprint:

<http://www.cafepress.com/libes.43758522>

Obfuscated C Contest website:

<http://www.ioccc.org/>

------
identitycrisis
As a fellow Yahoo good to still see people like andy *STILL around

~~~
ajays
I agree! (another purple-bleeder here)

------
swah
In the 90's, I always wondered how this stuff worked.

~~~
bigiain
And now it's 2011, I'm almost expecting some bright-young-thing to post up an
alternative method, which involves offloading the 3d render and animation to
the video card, painting that onto an invisible html5 canvas, then using
JavaScript to paint ASCII characters over the top based on the average
brightness/colour of regions of the hardware generated image...

~~~
JonnieCache
Isn't that basically how the various ASCII renderers for 3d games over the
years have worked? Minus the html5 canvas obviously, although being as you can
run the entire of quake in javascript/webgl, that can't be far off.

Good old aalib.

<http://aa-project.sourceforge.net/>

