Created
August 12, 2016 19:10
-
-
Save mk30/7f68f7e5ea37b7fde6dcf687dad24af9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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