Making a physical doughnut is easy enough, given a good dough recipe and a nice hot deep fat fryer. But have you ever considered making a one in physical electronic hardware, on an ASIC? [A1k0n] has, at least in terms of making a virtual doughnut. It’s a hardware implementation of a ray tracer which renders a rotating doughnut to a VGA screen, and it comes courtesy of around 7000 logic cells on the latest iteration of Tiny Tapeout.
We will not pretend to be mathematical or ray tracing experts here at Hackaday so we won’t presume to explain in detail the circuitry, suffice to say that the clever hack here lies in a method using only shift and add operations rather than the complex trigonometry we might expect. It uses a slightly esoteric VGA mode to work with the device clock, so while CRT monitors have no problems it can have artifacts on an LCD. The full explanation goes into great detail, for the math heads among you.
We’ve reported on quite a few Tiny Tapeout projects over the years, as the many-ASICs-on-a-chip extends its capabilities.
Amazing. As the summary implies, the real hack here is math behind the ASIC. Hats off to all the mathematicians that made this trigonometric feat possible!
This being a doughnut is probably a play on the famous Blender tutorials by Blender Guru
Idk I think people have been calling the torus primitive “the doughnut” in 3DCG for fifty years at least… It probably predates computers entirely
When I heard shift and add I immediately suspected CORDIC.
Maybe not sexy anymore, but you can do a lot of math with relatively few gates with CORDIC based algorithms. I think an implementation for doing trigometric functions is roughly a similar area to a hardware multiplier. (don’t quote me on that)