Hacker News new | past | comments | ask | show | jobs | submit login
Donut math - How donut.c works (a1k0n.net)
237 points by dmuino on July 20, 2011 | hide | past | favorite | 21 comments



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?


As a high school student, I can confirm you explained it well and I was able to follow it the entire way though. :)


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


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!


Congratulations. In my opinion, math is not easy to explain, but you did it very well. :)


Do you have any / know of any good documents about C obfuscation? I think that is the part that fascinates me most.


I don't know of any, but browsing through the archives of ioccc.org is probably an education in itself. That's where I got my own inspiration.


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


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


Anecdotally, yes.


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


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


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]);
    }
  }


javascript, 3D, and mathematica. A very smart, yet very pragmatic fellow. Hired.


Don't forget the ability to explain it well in writing!


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/


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


I agree! (another purple-bleeder here)


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


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...


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/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: