Implemented bezier curve with multiple segments.