implementing the marchingcubes algorithm

Dont know if this is going to compile