  - (diff_x)/(diff_y);
0038         nrm  = sqrt(1 + b*b);
0039         a = 1/nrm; b = b/nrm;
0040     <span class="keyword">else</span> 
0041         a = -diff_y/diff_x;
0042         nrm = sqrt(1 + a*a);
0043         a = a/nrm; b = 1/nrm;
0044     <span class="keyword">end</span>    
0045     length_here = sqrt(diff_x*diff_x + diff_y*diff_y);
0046     c = - a*c_x(1) - b*c_y(1);
0047     
0048     <span class="comment">%% get the distances of all curve points from the straight line</span>
0049     <span clas