Well, here’s the first of hopefully many iterations of this project. As it stands, all it does is interpolate ln(x) with 3 pre-defined points: (2,ln2),(3,ln3) & (4,ln4). Please feel free to add interpolating points (is that even the right word?) by clicking on the screen. It takes the x-co-ordinate of the mouse click & adds a tau. Hopefully in the future, it’ll be a tad more flexible, but I barely understand what I’m doing right now, so … BTW, I’m not entirely sure this is done right. I have tested it on about ten points, and it seems to work right, but y’never know. Also, it dies if you give it the same point twice.
MAN! Was this a pain or what? Finally got it. Turns out I had it about six hours ago, but there was a virtually invisible typo ( i’s and 1’s look pretty similar, wouldn’t you say? No?) Anyway, here it is. As before, you can click & put in a new interpolating point. Beware though: it only supports the first derivative, so I make no claims as to what it is that you get if you click in the same place more than twice. Also, due to some minor display optimizations(?), if you add a new point too far from the last, you can’t see it (the graph moves off the screen and it stops painting), so keep that in mind while playing around.
Shift-click to get function value at the mouse location.
L2 Piecewise Linear Splines
Ok, here it is. Nothing fancy, no interactive mouse stuff, no adding points. Nothin’. Just an L2 piecewise linear spline approximating the cosine, with taus at 0, Pi/2 & Pi. Hopefully, I will soon have this interactive, but, as you know, I need to write a matrix solving routine for an arbitrarily large matrix. This ain’t easy. It ain’t real hard, but it ain’t easy. I’ve got a matrix calculator goin’, but I need to re-write it to be able to (gracefully) solve for a vector. Oughta be up Real Soon Now.
Here’s this one, and, hoo boy, is it cool. You get to change the range of interpolation by filling in the fields, and change the scaling factor (zoom in/out) by filling in that field (big number=closer view), although changing the interpolation range resets the polynomial to interpolate only at the endpoints. Neat, huh?
Well, this is just about the same as the Hermite. As before, you get to change the range of interpolation by filling in the fields, and change the scaling factor (zoom in/out) by filling in that field (big number=closer view), although changing the interpolation range resets the polynomial to interpolate only at the endpoints.