Use a better method for computing the clip positions