Skip to content

Instantly share code, notes, and snippets.

@mk30
Created August 12, 2016 19:10
Show Gist options
  • Save mk30/7f68f7e5ea37b7fde6dcf687dad24af9 to your computer and use it in GitHub Desktop.
Save mk30/7f68f7e5ea37b7fde6dcf687dad24af9 to your computer and use it in GitHub Desktop.
var mesh = isosurface.surfaceNets([26,26,26],
function sdTorus(a, b) //a should be a vec3, b should be a vec2
{
c = [glvec2.length([a[0], a[2]])-b[0],a[1]];
return glvec2.length(c)-a[1];
}, [[-11,-11,-11], [11,11,11]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment