Caption
Found this old gem when walking through a pile of old papers. It generates an #ASCII #Stereogram from an input file. Stereograms used to be a big thing decades ago. 😎🤣I guess I’m finally getting old, but still have my #3D vision to view such images. 🤓Copy the C source from the #AltText and create a sample source image to do it yourself. Compile the source and run it as shown.#ascii #stereogram #3d #AltText #asciiart #c #programming #programminghumor #Linux #fun
![C source code of the ASCII stereogram generator. #include #include int main(void) { char *aktzeile, *auszeile, *dummy; char c; int spalten, amplitude, i, j, k, ebene; scanf("%d %d\n", &spalten, &litude); aktzeile = (char*) malloc(2*spalten*sizeof(char)+1); auszeile = (char*) malloc(2*spalten*sizeof(char)+1); k=0; while ( (c=getchar()) != EOF ) { ungetc(c, stdin); j=0; fgets(aktzeile, spalten, stdin); scanf("%s\n", &dummy); for (i=0; i'9')? 0 : ((int) aktzeile[j]-'0'); auszeile[j+amplitude] = auszeile[j+ebene]; } auszeile[spalten+amplitude] = (char) 0; printf("%s\n", auszeile); } return 0; }](https://cdn.masto.host/swisssocial/media_attachments/files/116/573/465/584/697/010/original/dbd2ec74bfc0221f.jpeg)