function [tipx, tipy, gx, gy, Qx, Qy] = open_link_2DOF_geometry (theta, param)
% tip point coordinates with gradient vectors and Hessian matrices
    theta1 = theta(1); theta2 = theta(2);
    l1 = param(1).length; l2 = param(2).length; base = param(1).base;
    C1 = cos(theta1); S1 = sin(theta1);
    C12 = cos(theta1+theta2); S12 = sin(theta1+theta2);
    tipx = base(1) + l1*C1 + l2*C12;
    tipy = base(2) + l1*S1 + l2*S12;
    gx = [ -l1*S1-l2*S12; -l2*S12 ];
    gy = [  l1*C1+l2*C12;  l2*C12 ];
    Qx = [ -l1*C1-l2*C12, -l2*C12;
                 -l2*C12, -l2*C12 ];
    Qy = [ -l1*S1-l2*S12, -l2*S12;
                 -l2*S12, -l2*S12 ];
end
