Generally speaking, objects can move along curved lines by utilizing the same data/method you used to draw the line in the first place.
There are many ways to draw or describe a curved line in different situations. How are you making your line?
For example, from what you said in your post, it sounds like you want to click a, and then click b, and have a curved line appear. But how do you determine if the line is curved to the left or the right, and how wide?