Modelling the folding of paper into three dimensions using affine transformations