Question about something in Hudak's book

Ludovic Kuty kuty@advalvas.be
Wed, 13 Mar 2002 09:50:24 +0100


At 12:33 13/03/2002 +1300, Tom Pledger wrote:
>Ludovic Kuty writes:
> :
> | Is it an idiom or some sort of optimization ?
>
>It's more to do with the particular algorithm for finding the area of
>a convex polygon.  Try working through the calculation of the area of
>this kite.
>
>    Polygon [(0, 0), (1, 0), (2, 2), (0, 1)]
>
>I think the two versions of the area function will give different
>results, and that this will highlight the reason for v1 being matched
>separately.


That's right.

My version is wrong because i forget to take into account
the "interior" surface of the polygon.
The bigger the polygon, the bigger the difference.

Thanks.

Ludovic Kuty