clf;

N=10000;

pas=0.05;

U=[]

for k=1:N,

u=4*rand()-2;

v=0.4*rand();

while v>sqrt(4-u^2)/(2*%pi),

u=4*rand()-2;

v=0.4*rand();

end

U=[U,u];

end

seq=-2:pas:2;

histplot(seq,U)

x=-2:0.01:2;

y=sqrt(4-x.*x)./(2*%pi);

plot2d(x,y,5)

xselect()