Using the node editor and Cycles, how can I define a material that looks like a torus? This is useful in order to render a really smooth torus, without needing to a bazillion vertices.
This can be achieved by using the following node setup:
The formula which I implemented in order to achieve this can be found in the Wikipedia article for Torus. Note that this only works for tori whose big radius is greater than or equal to it's small radius.