resolution = 1.0/32.0 data = sample_data(doubletorus_f, resolution, dimensions) print "done" print "dual contouring..." [dc_verts, dc_edges] = dual_contour(data, resolution, dimensions) print "done." #non_manifold_verts = detectManifolds2d(dc_edges) print "transforming into objects..." vertex_set, edge_set = transform_into_object_sets(dc_verts, dc_edges) print "done." print "building quadtree..." qt = Quadtree(8.0, np.array([0,0])) qt.add_dataset(vertex_set) print "quadtree of depth "+str(qt.get_depth())+" constructed." print "done." print "plotting..." import matplotlib.pyplot as plt #fig = plt.figure() #plot_qt(qt) #plot_vertices(vertex_set) #plot_edges(edge_set) #plot_non_manifold_vertices(dc_verts, non_manifold_verts) plot_qt(qt, 'b--') plot_vertices(vertex_set,'b.')