function open_link_2DOF_draw (theta, param)
% drawing 2DOF open link mechanism
    theta1 = theta(1); theta2 = theta(2);
    l1 = param(1).length;
    l2 = param(2).length;
    O = param(1).base;
    P1 = O + l1*[cos(theta1); sin(theta1)];
    P2 = P1 + l2*[cos(theta1+theta2); sin(theta1+theta2)];
    x = [O(1); P1(1); P2(1)];
    y = [O(2); P1(2); P2(2)];
    plot(x,y,'k-');
end
