Versatile and efficient techniques for simulating cloth and other deformable objects