Yeah, it looks like iters section is stepping along the rays (up to 15 times) and seeing if they intersect with the shape function, and lastIters is finding where each ray hits the shape. Everything before iters is there to set up the rays for each pixel, and the final steps are selecting a color. (I think.)
Not the author, but I thought this was fantastic. Not even sure how it’s possible
He’s just doing a very elaborate string parsing to get the ASCII art.
Sure looks like it’s doing some sort of simple ray tracing, doesn’t it?
Yeah, it looks like
iters
section is stepping along the rays (up to 15 times) and seeing if they intersect with the shape function, andlastIters
is finding where each ray hits the shape. Everything beforeiters
is there to set up the rays for each pixel, and the final steps are selecting a color. (I think.)SQL is Turing complete, so it was obvious that it is possible.
Obvious to you, maybe. I’m still seriously impressed with this.