Example 3 As shown in Figure 2, the three altitudes of acute $\triangle A B C$ intersect at point $H$. How many triangles are there in Figure 2?



The text above is translated into English, preserving the original text's line breaks and format.
Solution 1: Let the set of triangles with vertex $A$ be $P_{1}$. Then, the triangles with vertices on $A B$ and $A D$ are 3, the triangles with vertices on $A D$ and $A C$ are 3, and the triangles with vertices on $A B$ and $A C$ are 3, giving $\left|P_{1}\right|=9$.

Similarly, the sets of triangles with vertices at $B, C$ are $P_{2}, P_{3}$, and we have $\left|P_{2}\right|=\left|P_{3}\right|=\left|P_{1}\right|=9$.

The set of triangles with vertices at $A, B$ is $P_{1} \cap P_{2}$, which has 4 elements ( $\triangle A B E, \triangle A B D, \triangle A B H, \triangle A B C$), so
$$
\left|P_{1} \cap P_{2}\right|=4.
$$

Similarly, $\left|P_{1} \cap P_{3}\right|=\left|P_{2} \cap P_{3}\right|=4$.
The set of triangles with vertices at $A, B, C$ is $P_{1} \cap P_{2} \cap P_{3}$, which has only 1 element $(\triangle A B C)$. By the principle of inclusion-exclusion, we get
$$
\begin{array}{l}
\left|P_{1} \cup P_{2} \cup P_{3}\right| \\
=\sum_{i=1}^{3}\left|P_{i}\right|-\sum_{1<i<j<3}\left|P_{i} \cap P_{j}\right|+\left|P_{1} \cap P_{2} \cap P_{3}\right| \\
=9 \times 3-4 \times 3+1=16 .
\end{array}
$$

Solution 2: From the given figure, we can see 6 lines intersecting pairwise, and from the required figure, we need to find three lines that intersect pairwise but not at the same point (forming a triangle). Thus, from $\mathrm{C}_{6}^{3}$, we subtract the 4 points where three lines intersect at $A, B, C, H$, giving $C_{8}^{3}-4=16$.