Cloth simulation on CPU