g0tp0t
2010-11-11 16:21:55
i thought abouty random in a random, which i have used quite often. i decided to plot the ouput to see what the real probability was and it is exactly what i thought. its not a guassian function but it look human. try it:
{$i srl/srl.scar}
var b ,r,a,i: integer;
begin
b := CreateBitmap(200,200);
for i := 0 to 5000 do
begin
a := random(360);
r := round(random(random(100)));
FastSetPixel(b,round(r*cos(a))+100,round(r*sin(a))+100,clRed);
end;
DrawBitmapDebugImg(b);
DisplayDebugImgWindow(200,200);
end.
Why did I chose JPEG… ugh
The first is with Random(100), the second is with Random(Random(100)) ran for about 5 seconds.
Same as above, ran for 1 minute and 15 seconds
random(random(100)), random(75)
