how to realize the reciprocating swing