function IzrisElipsePogreskov(pT,a,b,th,n,M)

R = [cos(th),-sin(th); sin(th), cos(th)];
beta = linspace(0,2*pi,n);
pt = zeros(n,2);
pt95 = zeros(n,2);

for i=1:n
	dpt = R * [a*cos(beta(i)); b*sin(beta(i))]*M;
	pt(i,:) = pT + dpt';
	pt95(i,:) = pT + 2.447*dpt';
end

plot(pt(:,1),pt(:,2),'g-', pt95(:,1),pt95(:,2),'m-')
axis equal;
