How many triangles are in this picture? Is there any formula or computer software to calculate this?
Also: I know programming so I can program something to solve this if someone can point out an algorithm for this.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.Sign up to join this community
Here's a simple but tedious algorithm for you: Label the vertices $A, B, C, \ldots, N$. Now go through all triples in alphabetical order (thus $ABC, ABD, ABE, \ldots, LMN$) and check whether they form a triangle.
To improve this somewhat, take advantage of the symmetry. There are four vertices on the central axis; call them $A,B,C,D$. The others come in pairs: $E_1, E_2, F_1, F_2, \ldots, I_1, I_2$. Count the triangles that do not have vertical symmetry, and multiply by two. Then add to this count the triangles that do have vertical symmetry.