Smooth morphing between curves

How can I implement this algorithm?

This is for morphing curves in a particular way. Should I do it on pixel level or vector level?