
import numpy as np
import mcubes
from scipy import spatial

p = np.loadtxt('armadillo_sub.xyz')

#compute the enclosing grid
#TODO

X, Y, Z = np.mgrid[TODO]
kdtree = spatial.KDTree(TODO)


u = np.zeros_like(X)

for i in range(TODO):
    for j in range(TODO):
        for k in range(TODO):
            query = TODO
            #TODO: compute the signed distance
            #u[i,j,k] =

vertices, triangles = mcubes.marching_cubes(u,0)

mcubes.export_obj(vertices, triangles, 'result.obj')
