Calculating angle made with center of room - am I doing this correctly ? What method can I use?

32 Views Asked by At

The room

Note: it is say supposed to say 4,0 for the first location. 4,4 refers to the center of the room. Basically I have cameras placed in those three locations - (4,0), (0,8), and (8,8). I want to calculate the angle this makes with the center of the room. I have come up with the following so far: (4,0) makes angle 90, (0,8) makes angle 45, and (8,8) also makes angle 45. Is this correct? If I were to say, have a camera at (5,1), how would I calculate the angle ? My objective is to create a map of the room, am I doing this in the right way? Thank you!

1

There are 1 best solutions below

0
On

I assume corner (8,8) makes $ 135 ^{\circ}$ to horizontal in your scheme.And that for the coordinate axes reference you mentioned in your sketch as parallel to x-axis angle =0

For any other point in the room to calculate required anti-clockwise rotation use the formula

$$ \tan ^{-1} \dfrac{y-4}{x-4}$$

where arctan2 inverse function should be used always with proper sign.