Implement triangle subdivision.
Refactor triangle subdivision.