transformations function

Calculate similarity transformations