Added two new methods to calculate the position of the origin.