How Much Chocolate?
It is midnight and my stomach is talking to me. I hope to find something to eat in the kitchen and I see a chocolate bar:
Immediately made myself a cup of coffee and broke a piece of the chocolate bar:
After I “killed” the broken piece I started having second thoughts about my decision: Oh God; Did I eat too much chocolate?
I placed the leftover on a grid. This way I found where both whole and the broken piece lies on the grid:
The broken piece is shaped like a simple polygon. My goal is to calculate the area of that piece. There are several ways I could calculate the area. Although, the first thing comes to my mind is a theorem called “Gauss’ shoelace theorem”.
Gauss’ Shoelace Theorem
The shoelace theorem can only be applied to simple polygons. In order to use the theorem, I have to find where the edges of the simple polygon lie on the grid:
Theorem uses these points just like shoelaces. But first we have to define the edges and make a list of them:
Do not forget to add the first edge to the bottom of the list.
Now you can multiply the numbers diagonally; from right to left and left to right. Then add left to right and subtract it from right to left ones:
{(0*0) + (5*1) + (4*3) + (5*3) + (0*0)} – {(0*5) + (0*4) + (1*5) + (3*0) + (3*0)}
{32} – {5}
27.
The area of that simple polygon can be found by dividing the result above:
27/2
13,5
M. Serkan Kalaycıoğlu