This is an obfuscated, miniature Raytracing program.
It is described on site https://mzucker.github.io/2016/08/03/miniray.html
I found it by taking part of the mystery string "LJFFF%7544x^H^XXHZZXHZ"
, and googling for it.
If you run the compiled program and capture the output, you get a raytraced picture in .PPM format:
a.out > output.ppm
When I tried to run the program using a Visual Studio / Microsoft toolchain, this is what I got:
When I ran the same program on Linux/GCC, I got this image:
A bit more work, and I got this out of it:
.\a.out abelenky > abelenky.ppm
One of pictures I posted above came via a Visual Studio / Microsoft toolchain, and has obvious corruption in the bottom third of the image, as well as the checkerboard being green (it is supposed to be red).
I ran the same code via GCC on Linux, and the images came out perfectly.
I’m not sure where the difference comes from, but this helps illustrate how obfuscated code like this can highlight differences between Toolchains, Compilers, Operating Systems, etc, and proves why code like this has value.
I’m really disappointed that “user129…” thinks this is of no use in programming. It is one of the most advanced, award winning, obfuscated programs ever written. The techniques used to both develop the program and to obfuscate it are discussed in some detail on the github page and linked resources. It stretches C and graphics algorithms to the limits in some amazing ways.
This should be preserved and studied. Not mocked and closed.
0
solved Obfuscated code in C and what does this program code [closed]