Jan Skibinski <[EMAIL PROTECTED]> writes:
> then take half of its norm; 1/2 * sqrt (r1^2 + r2^2 + r3^2).
In his problem, not even that is necessary: Just taking the
z-component is enough (or even better if the big polygon is not
convex).
It will fail if the polygon is not plane, but then the area depends on
the choice of diagonals anyway (and the z-component is the projected
area).
A nice way to solve Friedrich's problem would probably be a function
that acts like the folds, but takes a ternary function:
fold3 :: (a->a->a) -> (b->b->b->a) -> a -> [b] -> a
fold3 additionOperator triangleArea initialvalue corners = ...
Ralf