{
const width=1500, height=400;
const svg = d3.select(DOM.svg(width, height))
const initialPath = svg.append("path")
.attr("d", adjustedFishPath)
.attr("stroke", "blue")
.attr("fill", "none")
svg.append("circle")
.attr("cx", fishCentroid[0])
.attr("cy", fishCentroid[1])
.attr("r", 3)
.attr("fill", "red")
svg.append("circle")
.attr("cx", ukCentroid[0])
.attr("cy", ukCentroid[1])
.attr("r", 3)
.attr("fill", "green")
const customEasing = d3.easeCubicIn;
initialPath.transition().ease(customEasing)
.duration(3500)
.attrTween("d", function () {
const interpolator = flubber.interpolate(adjustedFishPath, ukPath);
return function (t) {
return interpolator(t);
};
});
return svg.node()
}