Special kind of routing...

Hi all,
I’m looking for an approach to accomplish the following using osm data:
Lets say I’m standing on place a . I tell the program then: suggest me a tour of n kilometres so that after n kilometres I’m back at place a.
Should of course not be n/2 forth n/2 back - I’m thinking more of a circle around place a or something like that.
I have not been able to find something about this topic so far.
Any hints ?
Thanks in advance