1 function V=transformation(V,p,joints,i,finger,hand,rot_ee)
2 pos0=fkiCub(finger,hand,[0 0 0]',0,rot_ee,i);
3 [n,or0]=fkiCub(finger,hand,[0 0 0]',0,rot_ee,i+1);
5 pos=fkiCub(finger,hand,joints',0,rot_ee,i);
6 [n,or]=fkiCub(finger,hand,joints',0,rot_ee,i+1);
8 rot_base=axis2dcm(or0);
10 V=rototranslation(V,inv(rot_base),p);
13 V=rototranslation(V,rotnew,p);