Computing distance using trignometry

34 Views Asked by At

I need to compute the following distance Δd using trigonometry:

enter image description here

The image contains a green and a blue rectangle. Here are the measures:

Width of Green = U
Width of Blue = V
Height of Green and Blue = h
Rotation of Green and Blue along X-axis (clockwise) = θ
Need to compute = Distance between their top-edges after rotation (Δd)

Both rectangles were originally aligned to X-axis and their left edges coincided. Then both were rotated θ degrees clockwise around their centers (represented by faint dotted lines). I'm sure this can be done using trigonometry, but having spent the better part of last 2 days, I haven't been able to solve it.

1

There are 1 best solutions below

6
On BEST ANSWER

This problem is best tackled by looking at the two length $h$ segments that cut the rectangles in halves. I'll call these segments $S_1$ and $S_2$.

  1. The distance between the two centres is $v-u\over 2$ (that's the distance between the unrotated $S_1$ and $S_2$).
  2. The distance between $S_1$ and $S_2$ after rotation is therefore ${v-u\over 2}\cos \theta$
  3. There is a right triangle with sides $v-u\over 2$, ${v-u\over 2}\cos \theta$, and $\Delta d$. Therefore $$(\Delta d)^2+\left({v-u\over 2}\cos \theta\right)^2=\left({v-u\over 2}\right)^2$$
  4. It follows $$\Delta d={v-u\over 2}|\sin \theta |$$