Find x for a portion of arc-length of 3rd order poly when full length known.

496 Views Asked by At

Heads up.. I am in no way good at maths so be gentle with me.

I am trying to find x for a portion of arc-length of 3rd order poly when full length, function, and limits are known. The full length has be determined by $l= \int \sqrt{1+(f'(x))^2} dx$. (If anyone got a better way please let me know!). I basically want to know how I would make x the subject in the previous equation so that I can calculate x at say 75% of the full arc length of curve. I would need to be able to adapt the answer to computer code.

Thanks

2

There are 2 best solutions below

7
On BEST ANSWER

With $P(x)=ax^3+bx^2+cx+d$ the integral is

$$s_{01}=\int_{x_0}^{x_1}\sqrt{1+(3ax^2+2bx+c)^2}dx.$$

This is a nasty one, which requires the use of elliptic integrals, and the resulting function must be inverted. All of this must be done numerically and will be quite complicated.

An easier approach is by solving the differential equation

$$\frac{dx}{ds}=\frac1{\sqrt{1+P'^2(x)}}$$ using a numerical solver such as Runge-Kutta. You will step until $s$ reaches the $75\%$ of the full length (presumably obtained by a preliminary numerical integration over the whole $x$ range).


For a poor man's solution, flatten the curve (i.e. decompose it into a polyline made of short segments), and compute the cumulated segment lengths. This will give you an estimate of the full length. Then backtrack to find the segment where $75\%$ of the full length was crossed and perform linear interpolation to improve the estimate.


A more sophisticated but very accurate method is by decomposing the curve into circular arcs rather than line segments, by estimating osculatory circles from point triples. The fitting will be accurate to second order. Then the computation of the cumulated length along the polyarc is straigthforward.

0
On

When full arc length $s_{max}$ known and you wish to find $x$ as a fraction of it, (although a bit tough now), numerical curvature basis is perhaps more satisfying as it supplies $(x,y)$ as a function of arc length.

In the handwritten note there is an uncorrected error in first equation of (3) independent variable should be $s$ not $x$.

enter image description here