Haptic rendering algorithm based on discrete energy optimization method of preparation of human tooth