how to calculate rotation matrix. There are any references about how to calculate rotation matrix in here. you can look below.