Your definition of X.U.2 and Y.U.2 are based on P5.G(-20°) - always! No matter what angle alpha you later provide as argument in your functions. If this is on purpose my best guess is that you constructed the blue figure differently than in Autocad.
EDIT: The points you create do in no way correspond to the sketch you provided. I assume there are some 90° angles which are not denoted in the sketch. I am surprised as you wrote that the areas calculated are correct. As I interprete the sketch they shoulould differ by a factor of cos(alpha). For example the fourth point in the data you create is always straight down at (0/-pw). The sketch shows that point on a line which is 90° to the slope P0-P5.