Indexing scheme for manipulating 3D models or images for computer graphics