Random moving circles, leaving a trail?

I want to have circles or anything move around randomly, and using the drawing api leave a line trail. I would need to have the values of the random to be constantly feeding into the drawing api?