Again, Mathematica has a function that enables us to discard the areas after they have served their purpose. The third line above employs three list-manipulation functions besides Map . The way to understand what is going on is to start from the innermost function and work out. Rest returns the expression it is given with the first element removed. In our case, that gets rid of the areas.
Rest is mapped onto each area-triplet list in tri.
Flatten , without a parameter simply removes all nested lists, getting rid of inner braces. That would give us a list of real numbers, but we want to keep the triplets of vertices intact. So we flatten to level 1, hence the 1 in the above line. With that single line we have reordered the triangles largest to smallest and dumped the areas. Now we can turn our attention to rotation.