Splitting a quadrilateral into two triangles if it has a vertex with an inner angle bigger than 180º I'm trying to write an app in which I need to test if a 3D quadrilateral has some angle equal or bigger to 180 degrees, Ie., it is a degenerated or concave quadrilateral. If this is true, I have to split it into two triangles.
I have no problem on dividing the quadrilateral in two but don't know how to solve the test condition.
Thanks in advance for your help.
Edit:
I only know the coordinates of the  vertices

Firstly, since you haven't provided any information on the data that you already possess, I'm going to assume that:


*

*You know the values of the other 3 angles. In this case, the test condition is easy to solve:
$$
\text{Consider a quadrilateral ABCD, whose 4 angles are }
\angle A, \angle B, \angle C \text{ and } \angle D.
\\\text{If }\angle A+\angle B+\angle C=180^\circ,\text{then } \angle D=180^\circ
$$

*You know the coordinates of the 4 vertices. In this case, the test condition is satisfied if:
$$
\text{Consider a quadrilateral ABCD, with the coordinates of its 4 points as }\\A(x_a,y_a,z_a), B(x_b,y_b,z_b), C(x_c,y_c,z_c), \text{and } D(x_d,y_d,z_d).
\\\text{Use the distance formula to calculate AB, BC, CA, AD, diagonals AC and BD.}\\\text{Now, if any two sides add up to a diagonal, you have the angle between those 2 sides as }180^\circ\\
\text{For your information, the distance formula is}\\\bbox[5px,border:2px solid red] {D(P_1,P_2)=\sqrt {(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2},}\\\text{where } P_1=(x_1,y_1,z_1), \text{and }P_2=(x_2,y_2,z_2)
$$


I hope this answers your question, and I suggest that if it didn't answer your question, please clearly state exactly what data you are facilitated with.
