c c ------------------------------------------------ c subroutine rodcomATB(r1,r2,rout) c c combines two rotations as Rodrigues vectors c ROUT= R1+R2- R1 cross R2 / 1 - (R1dotR2) c except use the transpose of first rotation c real r1(3),r2(3),rout(3) real dot,cross(3) call vecneg(r1) dot=1.-scalar(r1,r2) call vecpro2(r1,r2,cross) if(abs(dot).gt.1e-5) then rout(1)=(r1(1)+r2(1)-cross(1))/dot rout(2)=(r1(2)+r2(2)-cross(2))/dot rout(3)=(r1(3)+r2(3)-cross(3))/dot else rout(1)=1e38 rout(2)=1e38 rout(3)=1e38 write(*,*) 'warning: RODCOM ->infinite result' endif return end c c ------------------------------------------------ c