random dot motion sensitivity test

Has anyone developed a random dot motion sensitivity test (preferably
using the PsychToolbox (either mac or windows)) ? And if so, would
you be willing to share your code? I am asking on behalf of a
colleague (Klaas Jan Bruin). The test will be used in an experiment
looking at mobility performance in visually impaired subjects.

Thanks in advance for any suggestions/snippets/complete tests :-).

Gr.

Frans