Live data from Hacker News

Deciphering the Business Card Raytracer

fabiensanglard.net

1–10 of 68 posts

Re: Deciphering the Business Card Raytracer

#5
post #4

The output file is .aek but I can't figure out what to do with it. My Google-fu is failing me this evening. How do you view the output?

The output is PPM, not AEK (that's Andrew Kensler's initials). Use PPM as the extension (similar to PGM, PNM and others http://en.wikipedia.org/wiki/Netpbm_format). It's not very common in consumer products (too primitive) but you can open in Gimp, Preview.app, IrfanView, XV and lots of others.

Re: Deciphering the Business Card Raytracer

#6
post #4

The output file is .aek but I can't figure out what to do with it. My Google-fu is failing me this evening. How do you view the output?

Yes, same problem. Google suggests it is an Adobe After Effects file. Linux "file" reports it as

card.aek: Netpbm PPM "rawbits" image data, size = 512 x 512

Not sure how to view Netpbm (portable bit map).

Re: Deciphering the Business Card Raytracer

#9
post #4

The output file is .aek but I can't figure out what to do with it. My Google-fu is failing me this evening. How do you view the output?

If you're using Linux or OSX, run it like this:

  ./aek > aek.ppm
That will produce an image in .ppm format. ('The world's second-dumbest picture format.') You'll probably have to convert it to a more widely supported format. Make sure you have the netpbm package installed, and then run, say:

  pbmtopng aek.ppm > aek.bmp

Re: Deciphering the Business Card Raytracer

#10

Would the wasted empty space in a #define return make up for the several return statements that I see? That is why typedef statements are nice, you can ; terminate them!

The original ended on line 35, column 28. By #defining return as u, it ends at line 35, column 19. Although I had to split the number 231184 across two lines (2311\84) to avoid a gap at the end of the line.

http://pastebin.com/6rM895SC

Post reply on HN