maths:rectangles_angled

calculating angle of fitting a rectangle inside a larger one such that 3 of its corners touch the side of the larger one

Introduction

  • this is a useful exercise for camping when one needs to ascertain at what angle a bed or rectangular inner tent can be placed inside a larger tent

Basic calculation method

  • let the sides of the larger rectangle measure a and b while the lengths of the smaller rectangle measures c and d
  • the diagonal of the smaller one must be less than the diagonal of the larger one to be able to be rotated inside it ie sqrt(c2 + d2) < sqrt(a2 + b2)
  • to touch 3 sides, the diagonal of the smaller one must be GREATER than the length of the SHORTEST side of the larger rectangle, if it is smaller, it can be rotated more but it will only touch two sides at most
  • the angle of the smaller rectangles diagonal is alpha and tan(alpha) = c/d
  • in a coordinate setup, place the larger rectangle as [0,a] and [0,b] rotate the smaller rectangle about a chosen point, and impose that three of the rotated vertices land on the edges x=0, x=a, y=0, or y=b.
  • the small rectangle will be rotated by angle theta such that 3 of its corners touch the side of the larger one
  • horizontal projection of smaller triangle (H) = c cos theta + d sin theta
  • vertical projection of smaller triangle (V) = c sin theta + d cos theta
  • where theta is positive and < 90deg
  • if one wished to solve for all 4 corners touching the sides, H = a and V = b, but for 3 corners we will just use H = a hence, a = c cos theta + d sin theta
  • rearrange using trigonometric auxiliary angle identity:
    • a = sqrt{c2 + d2} x sin(theta + alpha)
  • solve for theta
    • theta = arcsin(a/sqrt{c2 + d2}) - arctan(c/d)

Example

  • large tent is a = 2.69m, b = 4.42m ⇒ diagonal = 5.2m
  • small tent is c = 1.55m, d = 2.2m ⇒ diagonal = 2.69m, hence it can be rotated inside; the diagonal is at an angle alpha = 35.17deg
  • this is a special case where the diagonal of the small tent = shortest side of the large tent
    • in this case theta will be 90 - alpha = 54.8deg
maths/rectangles_angled.txt · Last modified: 2026/06/25 11:41 by gary1 · Currently locked by: gary1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki