gen.tailwin function

Utility function to generate tail-oriented window