Perpendicular chord lengths from the boundary points of an arbitary 2D shape

Let's generate an arbitrary convex domain with smooth boundaries:

Graphics[BSplineCurve[{{1, 4}, {5, 3}, {9, 4}, {5, 5}, {8, 7}},
SplineClosed -> True]] I'd like to discretize the boundary and calculate the perpendicular distances from each point to the corresponding points across the boundary of the domain. Like in the following picture: At first I thought it should be simple but after some time I couldn't come up with a proper solution. How would you do that? I'd appreciate any help!

• are the curves always parametric (as opposed to implicit) ? – andre314 Feb 5 at 18:44
• No, it can be implicit as well. I used parametric points just for the representation. – highly oscillatory integrand Feb 5 at 19:35

bsf = BSplineFunction[{{1, 4}, {5, 3}, {9, 4}, {5, 5}, {8, 7}}, SplineClosed -> True];
line = Cases[ParametricPlot[bsf[t], {t, 0, 1}] [], _Line, All][];

mesh = Range[0, 1, .1];
coords = Nearest[RegionIntersection[line,
InfiniteLine[{bsf[#], (bsf[#] + Cross[bsf'[#]])}]][]][bsf[#], 2] & /@ mesh;

ParametricPlot[bsf[t], {t, 0, 1},
Frame -> True, ImageSize -> Large, Axes -> False, PlotRangePadding -> 1, AspectRatio -> 1,
Epilog -> {Arrowheads[.03], {RandomColor[], Dynamic@
Text[Style[Round[#[], .1], 14, Darker@CurrentValue["Color"]],
#[], {-1.2, 0}, Subtract@@#],
PointSize[Large], Point[#[]], Thick, Arrow@#} & /@ coords}] Note: This is too slow to work interactively.