I
I
i_v2015-09-23 20:57:10
Mathematics
i_v, 2015-09-23 20:57:10

How to find the distance from the center to the side of a rotated rectangle?

There is a rectangle located at the origin. How, knowing the angle and dimensions of the rectangle, find the distance from this origin (the center of the rectangle) to its sides (A1 and B1 in the figure)?
0c4749c64bc94385b069f679cde1b45e.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mrrl, 2015-09-24
@i_v

If it is rotated through an angle a, then
A1=min(A/abs(cos(a)),B/abs(sin(a))),
B1=min(B/abs(cos(a)),A/abs (sin(a))).
If you have to divide by 0, then the result of the division is considered equal to infinity, and the value of the minimum is considered to be the second number.

V
Valentine, 2015-09-23
@vvpoloskin

So it should be infa, how much it was turned (the angle or the coordinates themselves). Based on it, you can get either the distance to a point, or immediately the leg of a triangle.
PS It would be a normal job as a full-time mathematician...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question