Script to generate random angles for projection

I do not want to reinvent the wheel: Would anybody give away a script that generates a number of combinations of random angles to be used for making random projections of a volume?
Thanks, D.

In reply to by dieter

You can use bfactor to apply a low-pass filter. It gives you the option to use a Gaussian or a cosine-edged filter. If you want to use bfactor only for low-pass filtering, set the applied B-factor to 0.

In reply to by niko

Thanks! Do I understand correctly:

I first make a (arbitrary) mask (level 0 for solvent and level 1 for protein) from my volume, then take this mask (and in bfactor) low-pass filter it (say e.g. 50,50 A), and setting the applied B-factor to 0, it will become a soft mask with raised cosine (with no sharp edges)? I have tried this but the levels are not any more 0 - 1 but something different. So, I cannot use it as a mask! What is wrong? What parameters would be a reasonable choice?
Thanks, D.