Cloth simulation and collision detection using geometry images