Suppose the wind is blowing from the north and the boat is facing west. Above the water, the blowing wind hits the sails, and because of the way that they are angled, pushes the boat to the southwest. The keel extends deep below the water. The water resistance on the keel creates a counterforce pushing the boat northward. Ideally, the northward force on the keel will counteract the southward component of the force on the sails, so that the boat will move to the west.
A problem can arise if the centre of the sails (called the Centre of Effort, or CE) is not directly above the centre of the keel (called the Centre of Lateral Resistance, or CLR). In general, the boat can pivot about the centre of the keel. If the sails are too far forward of the keel, the wind will push the bow (the front) of the boat southwards, and the boat will turn towards the south. If the sails are too far aft of (behind) the keel, the wind will push the stern (the back) southwards, and the boat will turn towards the north. Ideally, the sails and keel are balanced so that the boat sails in a straight line.
In this problem, you will examine a side view of the boat to determine whether the CE is above the CLR. The CE is defined as the centroid of the part of the boat above the waterline. The CLR is defined as the centroid of the part of the boat below the waterline. The centroid of a polygon is the unique point such that any line passing through it divides the polygon into two halves of equal area.
7 0 1 2 3 4 1 4 -3 2 -3 2 -1 0 -1
CE is forward of CLR by N units.
If the CE is aft of (behind) the CLR, print the line:
CE is aft of CLR by N units.
In both cases, replace the N with the difference in the x coordinates of the CE and CLR to two decimal places. If the x coordinates of the CE and CLR are equal, print the line:
Balanced.
CE is aft of CLR by 0.50 units.