www0.us.ioccc.org — Check out this winning entry from the The International Obfuscated C Code Contest (IOCCC). If you think your just looking at a crap program with bad coding style look again. Just focus and "you will find illumination!" It is a complete C program that runs and compiles that generates ASCII 3D "Magic Eye" images.
Feb 3, 2006 View in Crawl 4
mimoroxFeb 4, 2006
Check this out, about 3/4 of the way down there is some other C program, and an example of an ASCII stereogram.<a class="user" href="http://www.textfiles.com/art/alt3dste.reo">http://www.textfiles.com/art/alt3dste.reo</a>
thoreau2Feb 4, 2006
very cool
mecki78Feb 4, 2006
Here's how to compile it. You need to put these includes in front of the code (includes don't have to be within submission to the contest):#include #include #include After that you copy/paste his code. I stored it to test.c. Then you compile with GCC:gcc -o test test.cYou will get an executable test (or test.exe on Windows machines).Now you need an input file. He has two with the code:<a class="user" href="http://www0.us.ioccc.org/2001/herrmann2.ioccc">http://www0.us.ioccc.org/2001/herrmann2.ioccc</a>and<a class="user" href="http://www0.us.ioccc.org/2001/herrmann2.cup">http://www0.us.ioccc.org/2001/herrmann2.cup</a>This is the image you want to become 3D. Now you can call it like this on a Unix machine (including my Mac with MacOS 10.4):./test < ./herrmann2.cuporcat herrmann2.cup | ./testOn Windwos you should be able to do:type herrmann2.cup | testThe output is a lot of ASCII and if you know how to view the 3D magic images, you'll really see the cup. I can :-)
jimxugleFeb 4, 2006
thats from gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)
stonekeeperFeb 6, 2006
omg - that has got to be one of the coolest things I've ever seen. I need to get out more!
sintwarJul 13, 2008
<a class="user" href="http://www.eyesareamazing.com/default.aspx?id=26">http://www.eyesareamazing.com/default.aspx?id=26</a>