colors = Colormap(list(range(c)), 'rgb') vertexcolor = {key: colors(key_color[key]) for key in mesh.vertices()} # face coloring # which is the same as a vertex coloring of the dual key_color = vertex_coloring(dual.adjacency) c = len(set(key_color.values())) colors = Colormap(list(range(c)), 'rgb') facecolor = {key: colors(key_color[key]) for key in dual.vertices()} # the artist for drawing various versions of the mesh artist = MeshArtist(mesh) # mesh mesh.name = "Mesh" artist.clear() artist.draw_mesh() # edges mesh.name = "Edges" mesh.transform(X) artist.clear() artist.draw_edges() # vertices mesh.name = "Vertices" mesh.transform(X) artist.clear() artist.draw_vertices(color=vertexcolor) artist.draw_edges(color=(255, 255, 255))
def clear(self, **kwattr): artist = MeshArtist(self) artist.clear()