• he/him

Coder, pun perpetrator
Grumpiness elemental
Hyperbole abuser


Tools programmer
Writer-wannabe
Did translations once upon a time
I contain multitudes


(TurfsterNTE off Twitter)


Trans rights
Black lives matter


Be excellent to each other


UE4/5 Plugins on Itch
nte.itch.io/

tomforsyth
@tomforsyth

Context: this is part of a series of reposts of some of my more popular blog posts. It was originally posted in June 2013 here http://tomforsyth1000.github.io/blog.wiki.html#%5B%5BPolynomial%20interpolation%5D%5D. This version has been edited slightly to update for the intervening years.

I was reminded of this one recently when I saw this video by Stand Up Maths [https://www.youtube.com/watch?v=F_43oTnTXiw] / Matt Parker [https://mastodon.gamedev.place/@standupmaths@mathstodon.xyz/109819371402062543]. He uses some heavy tools, but I remembered that you don't need a maths degree to figure out an approximating polynomial for any function, and indeed it's fast enough you can do it in a game at runtime - it doesn't need to be precalculated - so it's enormously useful for all sorts of game-related things like graphics and gameplay. Anyway, on to the post.

In work recently [2013, PC VR at Oculus] I've been dealing with fitting polynomial curves to set of points. Normally for this job you'd reach for Mathematica or some other heavy-math package and use the right incantations. It would do Magic Math Stuff and spit out the right answer. The problem if you didn't really understand the question, and so you don't really understand the solution, and certainly it's hard to do things like implement at runtime in your own code, or explain why it doesn't work in some cases. So I do like to at least try to do it myself with my high-school math skills before reaching for the Math Wand.


tomforsyth
@tomforsyth

Feed Your Brain Friday gratuitous rehost!


You must log in to comment.

in reply to @tomforsyth's post:

Exactly. I did the above specifically for graphics, but then once I'd written the helper routine I ended up using it all over the place for gameplay tweaking and also incidental "juice" feel for little animation transitions.

Coming to an elegant solution and understanding the derivation is always satisfying. You downplay yourself with talk of high-school maths, but I think you have the right spirit for it. Enthusiasm, drive, and enjoyment are key. 😊

To be clear - I have plenty of maths skills (well, I used to - a lot of it has rotted - but I still remember the words!). But writing blog posts using that language is not something that interests me - there's plenty of them already. I am more interested in bringing people outside the mathmo group into the wonderful world of using computation to solve interesting problems, so that's the language I choose.

in reply to @tomforsyth's post: