Folding and fracturing of rocks