Comparing curviness between two curves that are made with points

I have two set of points [x,y] that forms a “curve”

How can i determine the “curviness” of a curve? As shown in the diagram, curve 2 is more curvy than curve 1.

I’m thinking to derive some kind of normalized value to compare the curviness.

by “curvy” do you mean a higher average angle?

yes, my approach is to calculate the angle between each set of three points, and average them out.

You are talking about the derivatives. So basic calculus stuff.

The first derivative tells you the slope of the line. Which is not expecially useful for your problem.

The second derivative tells you how fast the slope is changing. Which seems to meet your problem definition well. A high positive number means the line is curving up. A high negative number means the line is curving down. And a zero means the line is not curving.

1 Like

however my curves are not continuous, they are consist a few discrete points, say an array of five vec2 [x,y]

Add them and the larger absolute value is “more curvy” as @Kiwasi explains.

So what? Use discrete methods to get the absolute value of the derivative.