Computation of cavity shapes, sizes, and plasticities