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
Consider an ideal teakettle…
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)
From Someone who is great with science but had trouble learning math (at least math when the actual purpose and function behind the numbers aren’t explained) I completely lost the plot with reverse functions. I just barely understood functions and then my teacher said, “ok, now that we all have that completely mastered, let’s do it in reverse and do reverse functions!” That’s the moment I failed pre calculus.
gives a new meaning to from scratch…
So I don’t know it was using an ASIC, but OpenGL had that command to draw a tea kettle… one of those late 1990s or early 2000s 3d accelerator (i forget who but not ATI, Nvidia, or 3dfx) would get REALLY good performance on this. It turned out people used that as a simple benchmark so this card had special hardware just to draw the teakettle!