Create transform matrix