Thanks for all your help! I think I may solve my problem. Thank you again.
A “curvature comb” is a type of graphical diagram added to the plot of a curve which shows a number of “teeth” segments with their bases along the curve, oriented perpendicular to the curve and proportional in length to its curvature. I think you can better understand curvature comb through the following figure.
- The length of each curvature line is proportional to the inverse of the radius of the curve at that point.
- The direction of each curvature line is at 90 degrees (normal) to the curve at each point.
- The red outline shows the smoothness and character of the curve.
http://www.bluesmith.co.uk/evaluateComb.htm

clc;clear all;
i=0:360;
theta = 2*pi/360 * i;
x0 = cos(theta);
y0 = sin(theta);
%Curvature
%k2: curvature(k2=y''/[(1+(y')^2)^(3/2)]), where y' and y'' are the first
%and second derivatives
h1 = abs(diff([x0])) ;
h = [h1 h1(end)];
ht = h;
yapp1 = gradient(y0)./ht;
yapp2 = del2(y0)./ht;
k2 = abs(yapp2)./(1+yapp1.^2).^(3/2);
%normal vector of points
%dy=y2-y1;dx=x2-x1;
%normal vector: (-dy,dx) and (dy,-dx)
%Source:https://stackoverflow.com/questions/1243614/how-do-i-calculate-the-normal-vector-of-a-line-segment
dy = gradient(y0);
dx = gradient(x0);
quiver(x0,y0,-k2.*dy,k2.*dx,'g','ShowArrowHead','off','LineWidth',1);
hold on;
plot(x0,y0,'color','blue','LineWidth',1.5);



