Hi Michael,
Here's some pseudo-code. I don't think an excel spreadsheet would tell you anything much.
Actually no they cannot. You must rotate the displacement of C relative to B.
Tim
Here's some pseudo-code. I don't think an excel spreadsheet would tell you anything much.
Michael Horvath Wrote:I know that the XYZ coordinates can simply be added.
Actually no they cannot. You must rotate the displacement of C relative to B.
Tim
Code:
# Multiply a vector by a matrix
function Xn=MatVec(R,X)
for i from 1 to 3
Xn(i)=0
for j from 1 to 3
Xn(i)=Xn(i)+R(i,j)*X(j)
end
end
endfunction
# Multiply two matrices
function Rn=MatMat(R1,R2)
for i from 1 to 3
for j from 1 to 3
Rn(i,j)=0
for k from 1 to 3
Rn(i,j)=Rn(i,j)+R1(i,k)*R2(k,j)
end
end
end
endfunction
# Find the rotation and displacement of A relative to C [XCA and RCA]
# using # the rotation and displacement of A relative to B [XBA and RBA]
# and B relative to C [XCB and RCB]
function [XCA,RCA]=Compound(XBA,RBA,XCB,RCB)
RCA=MatMat(RCB,RBA)
XCBp=MatVec(RBA,XCB)
for i from 1 to 3
XCA(i)=XBA(i) + XCBp(i)
end
endfunction