Nice little gotcha there, assuming that the shape will be a square, since a square maximizes the contained area for a rectangle, while forgetting that the wall gives you extra perimeter for free, depending on the shape.
By the same analogy I'd tackle Roger's version of the problem, i.e. find ANY shape that will maximize the area: Again, I suspect that going for a (semi)circle might be essentially the same gotcha. I haven't got time to code it at the moment, but I'd investigate an (half) ellipse and also a parabola. Will need some integration though, to find the expression for the length of their curves. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm