I have some paths represented by Path2D. The Path consist of multiple CubicCurve2D or Line2D segments that are connected to each other. I would like to calculate or get the length from the start to the end of a Path. How can I calculate it or get it? Is it possible? I have checked the API documentation, but couldn’t find any useful methods.
I have some paths represented by Path2D. The Path consist of multiple CubicCurve2D or
Share
In light of a previous question on this topic, the article Computing the Arc Length of Cubic Bezier Curves may offer some insight. For convenience, you may want to look at the JScience
Polynomialclass. Also, this approximation, based on the same article, may help.