The problem seems to be straight forward, however my math isn't great, thus proving challenging. At this point I've almost come to the conclusion that there may not be a solution, however the little I do know of math there almost always seems to be a solution for those of you better informed.
I have three (x,y) verities in 2D plane, they form an (almost) right angle triangle (i.e. 94 or 87 degrees this does vary, however always with in a few degrees). Vertices are always in the positive axis "Q1", (I'm working with pixel data).
What I need is to find orientation of the triangle in 360 degrees:
- legs (opp & adj) are always against the (imaginary) x,y axis for all four quadrants, so hypotenuse is always facing outwards
- Triangle in:
- q i - 90 degrees
- q ii - 180 degrees
- q iii - 270 degrees
- q iv - 0 degrees
I have tried a number of solutions from various suggestions on this forum and else where, at the moment I'm working with this solution, however its not entirely working for me.
https://stackoverflow.com/a/15442539/14398314
Any advice would much be appreciated, language used is python.
Edit: The following image represents input data and required solution. Image of input and output data
Cheers