How pastries are folded to get their shape