%%%%%%%%%%%%%%%%%%%%% Euclidean Centre of Hyperbolic Lines %%%%%%%%%%%%%%%%%%%%% % % EUCCENTRE % Usage: z = EUCCENTRE(x,y) % Inputs: x,y are points in or on the hyperbolic disc % % Output: z the euclidean center of the line connecting the points % if x and y are not distinct or lie on a diameter inf is returned function z = euccentre(x,y) b = [x*conj(x)+1; y*conj(y)+1]; A = 2*[real(x), imag(x); real(y), imag(y)]; if det(A) == 0 z = inf; else c = A\b; z = c(1) +i*c(2); end