well, of course i can create formulas for each of those numbers, but not one formula which works for all. that is my problem.

what exactly do you mean by things like triangles in this context? how is 120 and 270 related in a triangle the same way like 180 and 180 ??