function [cc, r]=centerFromPointsAndAlpha(p1,p2,alpha)
%This function assumes that alpha is signed and p2 is after p1

beta=(pi-alpha)/2;

x1=p1(1);
x2=p2(1);
y1=p1(2);
y2=p2(2);

dx=x2-x1;
dy=y2-y1;

a=atan2(dy,dx);

%Only solution assuming that alpha is signed and p2 is after p1
a1l=a+beta;
a2l=a+pi-beta;

v1x=cos(a1l);
v1y=sin(a1l);
v2x=cos(a2l);
v2y=sin(a2l);

k1=-(v2y*x1 - v2y*x2 - v2x*y1 + v2x*y2)/(v1x*v2y - v2x*v1y);

ccx=x1+v1x*k1;
ccy=y1+v1y*k1;

r=sqrt((ccx-x1)*(ccx-x1)+(ccy-y1)*(ccy-y1));

cc=[ccx;ccy];