Package pygsear :: Module Path :: Class BrownianLinePath
[show private | hide private]
[frames | no frames]

Class BrownianLinePath

Path --+    
       |    
ListPath --+
           |
          BrownianLinePath


Line, with random motion superimposed.

Need to be careful that maxRandomness does not swamp out the motion along the line.

Might be good to limit maxRandomness to less than distance/steps
Method Summary
  __init__(self, startLocation, endLocation, maxRandomness, steps)
    Inherited from ListPath
  next(self)
return position
  reset(self)
put path back to original state
  set_loop(self, loop)
Set number of times to go around path.
  set_timePerPlace(self, duration)
  _oneLoop(self)
Check if should continue looping.
    Inherited from Path
  __iter__(self)
  get_direction(self)
Return the direction from the previous location to the current location.
  get_position(self)
Return position along Path
  get_x(self)
return x component of position
  get_y(self)
return y component of position
  onscreen(self, slack)
true if path position is on main window
  pause(self)
stop moving along path
  set_endTime(self, duration)
Path will raise StopIteration after self.duration seconds
  set_position(self, position)
Set position and update positionOld
  unpause(self)
resume moving along path

Generated by Epydoc 2.0 on Sat Dec 9 14:11:19 2006 http://epydoc.sf.net