```                ```
#include <stdio.h> // ./card > scala.ppm
#include <math.h>  // https://cassayre.me/card
int main(){printf("P6 512 512 255 ");for(int k=
0,w=512;k<w*w;k++){int x=k%w,y=k/w,j=234,r=(x+y
)/8|1,g=61+y/15,b=83;for(double e=6.28,h=150,d,
i,n=w-1,l=(x/n-.5)*h,c=35,f=h*(y/n-.5)+22;j>1;j
--)c>(d=sqrt(l*l+(n=c-.3*j)*n))&d>30?x=c-d>.3,y
=c-d<4.7,d=fmod(atan2(n,l)+e,e),(i=floor(f/c+d/
e)-d/e)<1.5&fmod(-f*e/c-d+3*e,e)>1.5&i>-1?g=y*r
/10+12,r=(int)(y*86+20+h*fabs((y^x)*n/c)),b=x*r
/5|1,j=0:0:0;printf("%c%c%c",r,g,b);}return 0;}
```
```

This C snippet which you may have found on the back of my business card implements a ray marching algorithm that produces the following 512x512 Scala logo: Pretty cool, I hope.

### Context

The idea of creating a ray tracer on a business card is not new. Paul Heckbert first introduced the concept in 1984 as some sort of challenge.

Later on Andrew Kensler created his own version in 2009 and is today one of the most famous example. He manages to pack a bunch of features such as reflections, shadings, or even distance blur.

Finally, the most recent creation to my knowledge is Mark Zucker's miniray who won the IOCCC-2011 contest.

My work is not quite a ray tracer although it was carefully crafted to look like it (explanations below).

### Features

• Prints a PPM image to the standard output
• Orthographic projection of a bounded helix