The possible sets of three vertices are:
ABC, ABD, ABE, ABF,
ACD, ACE, ACF,
ADE, ADF,
AEF,
BCD, BCE, BCF,
BDE, BDF,
BEF,
CDE, CDF,
CEF,
DEF
The valid triangles are those where the three vertices are connected by lines.
ABC, ACD, ADE, AEF, ABF, ABE
BCD, BCE, BCF, BDE, BDF, BEF
CDE, CDF, CEF, DEF
The invalid sets of vertices are:
ACF, ADF.
Valid triangles are:
ABC, ACD, ADE, AEF
BCD, BCE, BDE, BEF
CDF, CEF, DEF
However, due to intersecting lines, additional triangles are formed.
FAB, FBC, FCD, FDA
EAB, EBC, ECD, EDA
Triangles formed by F:
FAB, FBC, FCD, FDA
Triangles formed by E:
EAB, EBC, ECD, EDA
Listing the triangles:
ABC, ACD, ADE, AEF
FAB, FBC, FCD, FDA
EAB, EBC, ECD, EDA
There are 12 triangles in total.