{"version":"1.0","type":"rich","title":"Closest Point on a Path and Its Tangent","description":"This example shows a closed cardinal spline path with a draggable circle that snaps to the closest point on the path. As the user drags the circle over the SVG area, a red tangent line appears at the nearest path location, with its angle and position continuously updated based on the path geometry. The visualization uses D3’s drag behavior, SVG path interpolation, and a binary search plus linear scan to compute the closest point and tangent. It also includes the pathseg.js polyfill to support the SVGPathSeg API in browsers that removed it.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-4c5a34136c9a543d68de?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}