Dear Chenhui,
The pcurve_p2p (point to point) is a specific implementation of a parametric curve (for photonics) without width change at the moment. The width can be added to the function. More generic, a parametric curve can be described by functions x(t), y(t), w(t), with t = [0, 1] for the position and width of a curve as a function of t. It may by useful to add a function to take care of this as this question pops up more often.
Ronald