hpwd is now calculated correctly. It was a problem with the call to evaluatePoly
in calculateAlphaBeta: r instead of q was passed in and all alpha and beta
values were calculated with respect to r instead of q. Naturally all the (x,y)
    values are wrong.