/script>
[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

If you have two arbitrary points on the x-y plane, each with

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 21
Thread images: 2

File: pls halp.png (51KB, 800x800px) Image search: [Google]
pls halp.png
51KB, 800x800px
If you have two arbitrary points on the x-y plane, each with known first derivatives, what is the equation of the interpolating curve between those two points such that it starts and ends at the specified slopes?
>>
Plot the derivatives and find a function that goes through the two derivative values. Take the integral of this function and find c such that the integral equation goes through one of the original points given.
>>
>>8010463
f'(x) = (f'(a)-f'(b))/(a-b) (x-a) + f'(a)
>>
>>8010463
>Plot the derivatives and find a function that goes through the two derivative values.
But that's just restating the problem. What is the function?
>>
>>8010474
Meant to reply to>>8010470
>>
>>8010474
No it's not. The problem is to graph a function f(x) with the slopes given. Graph the slopes as values of a new function, f'(x). The simplest function through two points is a line. So define f'(x) as a line which goes through f'(a) and f'(b). This is >>8010472

Now we take the integral of f'(x)
>>
>>8010463
You want to use Newton's divided differences interpolation polynomial. To include derivatives, repeat the points and plug in the derivate f'(xi) for (f(xi)-f(xi))/(xi-xi)
https://en.wikipedia.org/wiki/Newton_polynomial
>>
>>8010463
f(x) = f(a)+(x-a)((x+a-2b)f'(a)-(x-a)f'(b))/(2(a-b))
>>
>>8010463
It can be pretty much anything really, it could be a squiggly wiggly, it could morph into a sign wave.

However, from your description, you probably want to use a cubic spline.

I would suggest reading up on C1 continuity though:
https://en.wikipedia.org/wiki/Smoothness
>>
>>8010490

y(x) = y1 + y'1 (x-x1) + [(y2-y1)/(x2-x1) - y'1]/(x2-x1) (x-x1)^2 + [y'2+y'1 - 2(y2-y1)/(x2-x1)]/(x2-x1)^2 (x-x1)^2(x-x2)
>>
>>8010510
Mine's better.

f(x) = f(a)+(x-a)((x+a-2b)f'(a)-(x-a)f'(b))/(2(a-b))
>>
File: 1450771622829.png (300KB, 469x540px) Image search: [Google]
1450771622829.png
300KB, 469x540px
>>8010514
Well, n-now it is:
[eqn]f(x) = f(a) + (x-a) \frac{(x + a - 2b) f'(a) - (x-a) f'(b)}{2(a - b)}[/eqn]
>>
>>8010463
I'm pretty sure there are at least continuum many functions that go through points A and B and have the specified derivatives at those points.
>>
>>8010685
You're looking at the inverse image of a point under a linear transformation from an infinite dimensional space to a four dimensional one. Why are you only pretty sure?
>>
>>8010692
Because there are definitely people who know more about functions than me on this board, so I may be proven wrong.
>>
All functions f(x) that

f(a)=A
f(b)=B
f'(a)=C
f'(b)=D
>>
>>8010472
>>8010497
>>8010510
>>8010514
>>8010522
So I just tried this and it's wrong.
>>
>>8010463
Catmull-Rom interpolation would work wouldn't it?
Bezier would work too I guess.
Either way you'd just need to generate points along the slope of each
>>
>>8012023
Yeah, I'm going with numerically approximated Bezier curves. Thanks, though,
>>
>>8010463
People are really overthinking this. Given the following data points:

Point 1: (x0, y0) with slope m0
Point 2: (x1, y1) with slope m1

You need a function like:

f'(x)= m0*g0(x) + m1*g1(x) with g0 = 1 at x0 and 0 at x1. Similarly g1 = 1 at x1 and 0 at x0.

g0(x) = (x-x1)/(x0-x1) works for the first part.
g1(x) = (x-x0)/(x1-x0)works fro the second part.

Putting this together:

f'(x) = m0*(x-x1)/(x0-x1) + m1*(x-x0)/(x1-x0)

Integrate this and you get a nice polynomial of degree 2.You can extrapolate this to any number of points and slopes.

Note this is not a unique solution, just a polynomial solution that works. There are an infinite number of solution many of which may not be explicitly expressible in a closed form
>>
>>8010463
Use Newton's Interpolating Polynomial and a difference table
Thread posts: 21
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.