added a function to calculate the missing on-curve points