function risi_brah(T1,T2,st_tock);
%RISI_BRAH narise brahistohrono
%RISI_BRAH(T1,T2,st_tock)
%T1=[x_1;y1]; T_2=[x_2;y_2], zacetna in koncna tocka
%st_tock je stevilo razdelitev intervala [x_1,x_2]
  clf;
  hold on;
  %naredimo premike tock;
  b=T2(1)-T1(1);
  B=T2(2)-T1(2);%pogoj B<0
  theta0=isci_theta(b,B);
  k=sqrt(2*b/(theta0-sin(theta0))); %dolocimo k v brahistohroni
  theta=linspace(0,theta0,st_tock); %interval risanja
  x=1/2*k^2*(theta-sin(theta))+T1(1);
  y=-1/2*k^2*(1-cos(theta))+T1(2);
  plot(x,y,'b'); 
  plot([T1(1),T2(1)],[T1(2),T2(2)],'ro');
  grid;
  axis equal;
  hold off