PSO-Based Generating Algorithm for Parametric Curve