There is a curve. How can I get its length?

mPaint.setAntiAlias(true); mPaint.setColor(Color.RED); mPaint.setStrokeWidth(8); mPath.moveTo(50, 50); mPath.cubicTo(x1,y1, x2,y2,x3,y3); canvas.drawPath(mPath, mPaint); 
  • What do you mean by the length of the curve? Maybe it makes sense to update it yourself at every drawing operation? - pavel
  • Curve length is a number that is usually obtained in mathematics by integrating the curve function. A smooth line can be measured with a ruler, how in android to measure the length of a drawn curve? - PeteGr
  • @PeteGr answer your own question, one of the ways to use the length formula is crooked through the integral. you have everything you need to calculate - ampawd
  • @PeteGr you need to substitute in one of the formulas the parametric equation of the cubic bezier curve and integrate from [0, 1] - ampawd
  • In general, the bezier line can be drawn without android functions. And in general, Android is also not needed, you can make your own operating system yourself))) found the answer. There is a special android function that returns the length of the curve)) - PeteGr

0