@lisyarus I was doing something similar for the map generation system for my game, but instead of triangles that you use it was hexes, fortunately I found this website that made things a whole lot easier for me to understand
https://www.redblobgames.com/grids/hexagons/ it might be somewhat useful since triangles and hexagons are kinda compatible