Since these images take so long (hours) to generate, I wanted to be able to time them and report exact run-times. But, I didn't want to add any extra instructions to do it, so I decided to use a very simple, low-tech approach.
I found this clock for $3.88 at Walmart. It normally runs off an AA battery. Instead, I'm running it from an unused output line on the PIC:
The resistor and diodes form a crude 1.4 V regulator. The clock wouldn't run with small capacitors - the hand would twitch but not fully advance. The mechanism must need a hefty current pulse to actually advance it.
I was able to set and clear a bit in the code just by changing the constants that get written to the ports, so I didn't increase the code size at all.
To use the timer, you set the clock to 12:00 before a run, then come back and read off the elapsed time after it's done. For very long runs, you just have to check the clock every 12 hours. This would at first appear to violate the Nyquist criterion, since the period of the clock is 12 hours, meaning you have to sample at least every 6 hours, but it doesn't :-)
I probably won't have timing data before the contest deadline, but I'll post it here when I have it.
The ray-tracing took 1 hour and 28 minutes to run:
I'm timing the fractal code now. I think that takes longer...
Technically, I was correct, the fractal code took longer, but not much: 1 hour and 32 minutes. Funny, they're pretty well matched.
I didn't wait around while I was running these things before - I always kicked them off before going to bed, or something like that.