1
$\begingroup$

enter image description here

hi..

I need to fit a rectangle of fixed height (a) inside a known rectangle and have all four corners touch.

the top image is an example of a solved problem.. i don't need to know those numbers anymore-- i can figure them out.. but- i drew that one backwards (drew the white rectangle first then the black one around it) for sake of example..

so using the bottom image, how would i figure out the length of the white rectangle which fits inside the black one? (pretty obvious but the black rectangle is 5units x 8 and the rectangle needs to be 1 unit in one direction and can be scaled to length for the other dimension)

pretty much any relevant new info i can get for the white rectangle will be ok.. it doesn't have to be the length.. any of the angles will be ok too.

thanks for any help!

$\endgroup$
  • $\begingroup$ no, it won't always be 1 unit.. it will however be a predetermined width.. that said.. 8.434 isn't the right number.. only two corners will touch instead of all 4..(well, i suppose i could get three corners to touch but still.. image at dropbox $\endgroup$ – j__e__f Jan 9 '15 at 7:52
0
$\begingroup$

enter image description here

With L=length of inner rectangle = "g" on the image.

So, noting that the 4 triangles were similar, you could solve a system of 3 unknowns and 3 equations. $$\frac{1}{AH}=\frac{L}{8-AE}\\\frac{1}{AE}=\frac{L}{5-AH}\\1^2=(AH)^2+(AE)^2$$

I believe that gives the correct length of 8.57548 but I would think must be an easier way...

$\endgroup$
  • $\begingroup$ hey turkeyhundt.. yes, that number appears to be very very close (i'll need to take it out to more decimals to get it exact but the equations seem to be doing the trick).. i'll try to script (python) what you've shown but yeah, if you can come up with something simpler, that would be sweet.. (as in, it's going to take me a while to understand what you've done there ;) ) $\endgroup$ – j__e__f Jan 9 '15 at 8:43
  • $\begingroup$ yeah, i have a feeling we're making this too complicated. most people on this site are much better at math than me, so if you leave my answer unaccepted, maybe one of them will come along and set you up. $\endgroup$ – turkeyhundt Jan 9 '15 at 8:49
  • $\begingroup$ i think the 'much better at math' people are stumped ;-) ..nice job at figuring out this solution. thanks for your help! $\endgroup$ – j__e__f Jan 10 '15 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.