File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programming Diversions and the fly likes Hinged Screen Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "Hinged Screen" Watch "Hinged Screen" New topic

Hinged Screen

Bert Bates

Joined: Oct 14, 2002
Posts: 8896
A hinged screen with two panels of the same size is placed into the (90 degree) corner of a room. At what angle should the panels be arranged so that the corner and the screen enclose the greatest area?

[ November 16, 2003: Message edited by: Bert Bates ]

Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
Hmmmm, a bit more complex than I first thought. I'm getting careless. Anyway, the angle with the wall is 3π/8, or 67.5°

"I'm not back." - Bill Harding, Twister
Joel McNary

Joined: Aug 20, 2001
Posts: 1824

If the width of one panel is x, and the angle of the hinge is 90 degrees, then the area enclosed will be x^2, for you will have formed a square of side length x.
If you make the angle of this hinges 180 degrees (the two panels form a straight line), then you can make a 45-45-90 right triangle in the corner with a base of 2x and legs x * sqrt(2), creating a triangle with base 2x and height x, and thus having an area of x^2 (same as the square).
However, if you have an angle of 135 degrees, then you have created a shape that can be described as two trianlges that share the same base. That base is of length approx. 1.86 * x, and the two trangles have areas of .35 x ^2 and .85 x ^2, summing for an area of 1.2 x ^2
Since both extremes have been demonstrated to have the same value, (and since I never did do much with calculus), I will take as the maximum possible the midpoint between the two extremes (135 degrees), with an area of 1.2x^2.

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Joel McNary

Joined: Aug 20, 2001
Posts: 1824

Which does form an angle with the wall of 67.5 degrees.
I agree. Here's the link:
subject: Hinged Screen