Distance Render - Implict Torus

this renders the implicit equation for a torus:
Math.pow(vx  * vx  + vy * vy + vz * vz + R*R - r * r, 2) - 4 * (R * R)*(vx * vx + vy * vy);
more info here: http://actionsnippet.com/?p=1343