matlab pointlocation,finding location of a point along the arc distance in matlab

OK, a line distance on a parabola is not obtained by integration per se. I replaced your a with \gamma for convenience.

y = gamma(x-alpha)(x-beta) -> gamma*x^2 + (-gamma*alpha - gamma*beta)*x + alpha*beta*gamma

Substitute:

a = gamma

b = -gamma*alpha - gamma*beta

c = alpha*beta*gamma

So one can write:

y = a*x^2 + b*x + c

From this formula (parabola) the focal point f is determined by:

f = (1-D)/(4*a) - (-D)/(4*a)

In which

D = b^2 - 4*a*c

Now first define p as the perpendicular distance from a location on the curve to the vertical axis of symmetry x_p:

p = -b / (2*a) - x_p;

From this the arc length is calculated by:

h = p/2

q = sqrt(f^2+h^2)

s = h*q/f + f* ln (h*q/f)

In which s is the paramatric representations of your curve. The length of a curve is found by using two points s and then the distance between those points, so:

Distance = s_1 - s_2 = (h_1*q_1/f + f * ln (h_1*q_1/f)) - (h_2*q_2/f + f * ln (h_2*q_2/f))

With some simplifications:

Distance = (h_1*q_1 - h_2*q_2)/f + f* ln (( h_1 + q_1) / (h_2 + q_2))

To implement it fully in MatLab is up to you for now. Let me know if you run into any problems.

Good luck and have fun!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值