1 function drawResultsiCub(hand, x, xo, contactPoints, normals, imgpath)
11 plot3(x1(1),x1(2),x1(3),'*b','LineWidth',8.0);
12 plot3([x1(1) x1(1)+normals(1,1)], [x1(2) x1(2)+normals(2,1)], [x1(3) x1(3)+normals(3,1)], 'r');
13 plot3(x2(1),x2(2),x2(3),'*r','LineWidth',8.0);
14 plot3([x2(1) x2(1)+normals(1,2)], [x2(2) x2(2)+normals(2,2)], [x2(3) x2(3)+normals(3,2)], 'r');
16 if (size(contactPoints,2)>2)
18 x3=contactPoints(:,3);
19 plot3(x3(1),x3(2),x3(3),'*g','LineWidth',8.0);
20 plot3([x3(1) x3(1)+normals(1,3)], [x3(2) x3(2)+normals(2,3)], [x3(3) x3(3)+normals(3,3)], 'r');
24 plot3(xo(1),xo(2),xo(3),'og');
26 %drawHandiCub(x,hand);
27 drawHandiCubCAD(x,hand);
32 if (~isempty(imgpath))
33 saveas(img,imgpath,'fig');