https://www.ioccc.org/1998/banks.orig.c
https://www.ioccc.org/years.html#1998_banks
Tangentially reminds me of my own animated GIF app that I made a while ago.
https://www.gifcii.fun
- Add #include <stdio.h> (for printf())
- Add #include <string.h> (for memset())
- Add "int" before the initial bare declaration of "k"
I compiled it with:
$ gcc -o donut -std=c89 donut.c -lm
- Specifying an old language standard to get rid of the need to say "int" before main()
- Linking the math library ("-lm") for the trig functions.
Update: minor grammar and clarification.
Further, you can add includes on the command line
cc -std=c89 donut.c -include stdio.h -include string.h -include math.h -lm
gcc -lm donut.c
made me laugh to see "no raytracing", then immediate use of the perspective projection which is intersecting points and a plane along a ray lol...
https://www.ioccc.org/1998/banks.orig.c
https://www.ioccc.org/years.html#1998_banks