Actually, I have no knowledge in Mathematica. I posted a mathematical problem in math.SE, but user170231 suggested me to post it here.
He said it can be solved using "way of image processing".
If possible to solve it by "way of image processing", then it will be as a verification only.
Also, I want to note again that: "All triangles must be considered, even tiny ones. Otherwise, the coordinates will not be given in this way" (All triangles, including those which do not lie on the boundary of the 3-4-5-triangle).
My Original Post:
While reading a pdf Arabic math book, counting chapter, I found this question:
It says:
The points $(0,0),(0,3),(4,0)$ are jointed to each other. Also, the points:
$(0,1),(0,2),(0.8,2.4),(1,0),(1.6,1.8),(2,0),(2.4,1.2),(3,0),(3.2,0.6)$ are jointed to each other and to the vertices of the $3-4-5-$triangle. What is the total number of triangle? (Note: All triangles must be considered).
I tried to use simple formulas of counting triangles in simple shapes, like the big triangle is divided by joining a straight line from a vertex to the opposite side, we just count the number of bases on the divided side, we apply the formula $N=n(n+1)/2$. Also for adjacent equilateral triangles we can use the formula $N=n(n+2)(2n+2)/8$ and then we round down, where $n$ is the number triangles on one side of the big one, .... and some other simple shapes. I tried to combine some of the together, but noway.
What I knew about the given points is to make fixed total number of triangles. Moving a point slightly may change the answer. THERE ARE SMALL TRIANGLES!
But this one is so complected, and without calculation, I think the total number of triangles is so large number. Maybe it is okay to keep the answer in a form containing factorials or $^aC_b$ or or $^aP_b$ such forms. I am not sure how to begin.
If the vertices of the triangles that to be counted lie on the boundaries of the $3-4-5-$triangle, then this is:
$$^{12}C_3-^6C_3-^5C_3-^4C_3=186$$
But this is not the case, the required is to find the total number of possible triangles in the figure. Note: listing the coordinates implies an interest in the tiny triangles. Also, note that: because of these particular given coordinates, we have some intersection points of $3$ lines, and some of only $2$ lines, resulting some tiny triangles to be considered.
EDIT:
Here is a big figure, I used desmos to make it:
Any help would be really appreciated. THANKS!
Any help would be really appreciated. THANKS!