Triangle indexing