Is it possible to find the width and starting coordinates of the biggest horizontal rectangle of a fixed height inscribed in a given sector with any angle?

Sector with an inscribed rectangle.

This is actually to do with computer programming. I am creating a pie chart and the rectangle is supposed to hold a label relating to the information represented by the sector. I can measure the width of the text(of constant height) that I want to place within the rectangle. If I can find the width of the widest horizontally placed rectangle of a given height, I can decide if the label would fit completely within the sector. If not, it would need to be moved outside of the circle. The sector has a variable angle as in a pie chart different sectors have different angles.

I am not too good at geometry, so I thought of asking here. Please let me know if any other information is required.

  • $\begingroup$ Yes, but I would say that the positioning of your sector around the circle will give distinct answers even for the same inner angle. Your left- or right-most 30 degrees sector will allow a longer word compared to your upper- or lower-most 30 degrees sector. $\endgroup$ – Yaya Manisya Sep 14 '18 at 4:31

Your Answer

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

Browse other questions tagged or ask your own question.