%%%%%%%%%%%%%%%%%%%%% Intersecting Pencil function %%%%%%%%%%%%%%%%%%%%% % % INTPENCIL % Usage: h = INTPENCIL(Z,A,B,CA,CB) % Inputs: Z(1)+Z(2)*I, A(1)+A(2)*I and B(1)+B(2)+I, are % the euclidean centers of lines L, LA and LB % CA and CB are angles % % Output: a value h which is zero if the line L meets LA at angle CA and line LB at angle CB function h = pencil(Z,A,B,CA,CB) hA = (A(1)*Z(1)+A(2)*Z(2)-1)^2-(A(1)^2+A(2)^2-1)*(Z(1)^2+Z(2)^2-1)*cos(CA)^2; hB = (B(1)*Z(1)+B(2)*Z(2)-1)^2-(B(1)^2+B(2)^2-1)*(Z(1)^2+Z(2)^2-1)*cos(CB)^2; h = hA^2+ hB^2;