IOCCC image by Matt Zucker

The International Obfuscated C Code Contest

2001/herrmann2 - Most eye-crossing

SIRDS/3D generator where the source is SIRDS/3D itself

Author:

To build:

    make

To use:

    ./herrmann2

Try:

    ./try.sh

If you use vi(m) you can see a pattern in herrmann2.cup and herrmann2.ioccc by say:

    /[pon]\

and

    /l

For additional fun in herrmann2.cup try:

    /[po]
    /q

and in herrmann2.ioccc try:

    /n

Judges’ remarks:

Be careful when staring at the source code - your eyes might cross, but if you concentrate on your focus you will find illumination!

Author’s remarks:

You probably know those “magic eye” 3D pictures - pictures looking like random noise, but when you look “through” the paper, you either get a three dimensional picture or a headache. With this program, you can create your own 3D pictures in ASCII art. And yes, the program itself is such a 3D picture.

How to use it

  1. Create a file which describes the desired 3D picture. The file must be a block of lowercase letters the size of the desired picture. The letters specify the depth of the corresponding pixel: a means close to the paper, z means far away. The info files are examples. Be aware that the size of the picture is restricted to about 9k.

  2. Pipe your picture into the program. The output will be your 3D picture, constructed of random characters (with ASCII code between 32 and 126). For example, type

    ./herrmann2 < herrmann2.ioccc
  1. If you want to control the characters used in the output (for example if your picture is to consist only of digits), pass them as the first argument. In this case, each time the program needs a new random character, it will take the next one from the argument. When it arrives at the end of the argument, it will start over at the beginning. Example:
    ./herrmann2 "234 84 045 5 6765 7487 65190 84 656 254 12 43931 818 0 6542 \
    341 45 567 76967 7244 606 976567 895 81898 095 68678 1843 4650547 \
    565980691 389 04974" < herrmann2.ioccc

Some hints to get better results

Extra-Features

    ./herrmann2 \
    'char*d,A[9876];e;b;*ad,a,c;  tw,ndr,T; wri; ;*h; _,ar  ;on;'\
    ' ;l ;i(V)man,n    {-!har  ;   =Aadre(0,&e,o||n -- +,o4,=9,l=b=8,'\
    '!( te-*Aim)|(0~l),srand  (l),,!A,d=,b))&&+((A + te-A(&(*)=+ +95>'\
    'e?(*& c_*r=5,r+e-r +_:2-19<-+?|(d==d),!n ?*d| *( (char**)+V+), ('\
    '  +0,*d-7 ) -r+8)c:7:+++7+! r: and%9- 85! ()-(r+o):(+w,_+ A*(=er'\
    'i+(o)+b)),!write,(=_((-b+*h)(1,A+b,!!((((-+, a >T^l,( o-95=+))w?'\
    '++  &&r:b<<2+a +w) ((!main(n*n,V) , +-) ),l)),w= +T-->o +o+;{ &!'\
    'a;}return _+= ' < herrmann2.ioccc

Why this program should win

    ./herrmann2 < herrmann2.cup

and let the result inspire you. ;-)

Requirements to the compiler / Compatibility

Inventory for 2001/herrmann2

Primary files

Secondary files


Jump to: top