A convex shape $C$ is cut using a a chord. What is the width of the resulting segment? This is the length of the green thick short line in the figure below:

Here is my current solution:
- Mark the endpoints of the chord by:
$$A_1 = (x_1,y_1) = (x(t_1), y(t_1))$$
$$A_2 = (x_2,y_2) = (x(t_2), y(t_2))$$
- Calculate the slope of the chord:
$$s = (y_2 - y_1) / (x_2 - x_1)$$
- Find the point $T$ on the curve in which the tangent is paralle to the chord (the slope is equal to $s$), i.e. find the value of $t$ for which:
$$y'(t)/x'(t) = s$$
And then let:
$$T = (x_T,y_T) = (x(t),y(t))$$
- Calculate the distance between the point $T$ and the chord according to the formula of the distance between a line and a point:
$$\operatorname{distance} = \frac{|(y_2-y_1)x_T-(x_2-x_1)y_T+(x_2 y_1-y_2 x_1)|}{\sqrt{(y_2-y_1)^2+(x_2-x_1)^2}}. $$
Is this calculation correct?
Is there a simpler way to calculate the distance?
In particular, the most difficult step here is step 3, which requires to solve a non-linear equation. Is there a way that does not require to find the point $T$ as in step 3?