6 On the $x O y$ plane, the vertices with coordinates $(x, y)$ satisfy $1 \leqslant x \leqslant 4,1 \leqslant y \leqslant 4$, and $x, y$ are integers. The number of triangles is $\qquad$ .
6 516. There are 16 points satisfying $1 \leqslant x \leqslant 4,1 \leqslant y \leqslant 4$. Choosing any 3 points from these, there are $C_{16}^{3}=$ $\frac{16 \times 15 \times 14}{2 \times 3}=560$ ways.
There are 10 lines (4 horizontal, 4 vertical, and 2 diagonals) that contain 4 of these points, thus there are
$$
10 C_{4}^{3}=40
$$

degenerate triangles.
There are 4 lines that contain exactly 3 of these points, producing 4 degenerate triangles.
Therefore, there are
$$
560-40-4=516
$$

triangles.