This is a fun one! There are two ways to invoke the program. The simpler one is supplying latitude and longitude (two args). This will print the antipodal coordinates.
Now what is the antipode you might ask? Well rather than explain it technically I'll repeat a common myth that you might have heard if you're in North America or Europe (and perhaps other places in the world). In fact this myth is even shown in the film Goonies!
They say that if you dig deep enough in the Earth you eventually end up in China. This is not quite correct. This would only happen if you're in Argentina. Well maybe a bit more than that since China is way bigger than Argentina. This means it is the diametrical opposite of the Earth.
So for that example we can give the coordinates somewhere in Argentina, say at -40.000000 -63.000000, and the program will show you: 40.000000 117.000000.
That's fine and well but what good is that without it being on a map? I took the famous Blue Marble map, converted it to a PPM image (though you can also use any other PPM image: make sure it's equirectangular if you want accurate results, however) and added a second form: lat lon in.ppm out.ppm.
What this does is it renders two arrows: down from the starting coordinate and up where you would end up. The down arrow is red to indicate that you should not do that as you'd die; up is green which indicates if you were by chance under the Earth you'd want to get up as soon as possible!
If you guessed that this then shows on the output PPM file where you would start and where you would end up you're exactly right. However because some of us (like me) have rubbish vision, I made the arrows extra big. This scaling means that the arrows are not going to be exactly at the right spot (and obviously even a square would not be precise but I wanted the visual indication and arrows seemed like a great way to go about it). For instance in my try.sh script I show Snake Island but the arrow is on mainland rather than in the ocean.
Some might see that as unfortunate and I sympathise with that view but it was necessary so that more people can see. Frankly I would, if I did it over, have made it a bit bigger still. Nonetheless it's probably a reasonably good size.
The small.c program shows what it looked like in an earlier version but it also demonstrates how the code must use floating point arithmetic. This is because for some coordinates you obviously need negative zero. The simple fact is that the larger size is, whilst maybe not the nicest, simply necessary, and in any case it's not like every part of the arrow would be on the coordinate anyway. And obviously just a single pixel would be impossible to see (or it would be for many and it would not be nearly as fun as arrows).
I might add that one of the reasons I made them different colours is for those who have problems distinguishing colours. That of course won't work for everyone who has this problem but this is also why it goes along with the arrows. Actually I made it so you can configure the colours for each arrow so that if some colour does not work for you you can change it!
It might be worth noting though that some colours obviously won't work since it goes on the map and so blue would be hard to see on the ocean (and maybe in some dark green areas, for example). White might show up fine in some areas but not in snow/ice areas (though at the rate the world is changing that might be less of a problem as time goes by).
But of course the reason for green and red is because it is what many countries have as traffic signals for go and stop. Obviously only two colours are necessary here!
I would like to bring up a few fun things I did. In particular the variable 'd'. It starts out at -1. I challenge you to change this. It will break the code: in different ways depending on what you do. Then later the code challenges you to change a '!= 1'. If you do it'll break the code as well. The comment following it suggests that the variable must be 1 but in fact it's not the case. If it's 1 then calloc() failed. Obviously 'd' is used in critical ways. I also recommend you compile and run debug.c. You'll see a huge amount of output, showing heavy mutation of the table. That is only one part of the obfuscation.
The code and remarks have a lot of jokes about the shape of our Earth, taking the piss out of Flat Earthers and Hollow Earthers. Actually I even suggested an award title: Best (or Worst) Abuse of Flat Earth Society. But 'Opposite' is more descriptive: though as I said somewhere I was rather surprised nonetheless.
There are some fun images I included as well but those are for people to discover. They mock Flat Earthers. There is even an equirectangular 'map' of Flat Earth: with it under water. Obviously. The try.sh script uses that 'map' as well for some fun.
There are some fun references to Journey to the Centre of the Earth as well.
For much more that I wrote see the entry on the IOCCC website: https://www.ioccc.org/2025/ferguson/index.html.