Temporal Potential Function Approach For Path Planning In Dynamic Environments