ENH: added parameter to use periodic x-coordinates

What happens if `period <= 0`? Is the behavior well defined? Or should an error be raised?