a = 1;

b = 1;

%% define the x-space

xmin = 4;

xmax = 5;

%% convert in t-space

tmin = acosh(xmin/a);

tmax = acosh(xmax/a);

%% hyperbola computation

t = linspace(-tmin,tmax,10);

x = a*cosh(t);

y = b*sinh(t);

%% final plot

figure, set(gcf,'color',[1 1 1])

plot(x,y,'b-o','linewidth',3,'markersize',10,'markerfacecolor',[1 1 1])

hold on

plot(-x,y,'r-o','linewidth',3,'markersize',10,'markerfacecolor',[1 1 1])

xlabel('x coordinate','fontsize',18)

ylabel('y coordinate','fontsize',18)

set(gca,'fontsize',18) 

%% plotting the circle centered at (x,y) with radius r.
y = 0 ;
r = 4 ;
ang=0:0.01:2*pi; 
xp=r*cos(ang);
yp=r*sin(ang);
plot(xp,yp);
title('Intersection of a circle and a hyperbola')

