I finally had the time to finish this post by whipping up a small JavaScript canvas example to show forward differencing in action. Not much to see there, actually, other than that the regularly drawn spline and the one drawn with forward differencing look the same. Here’s the part of the code that does theContinue reading “Calculate Catmull-Rom splines using forward differencing – UPDATE”
Tag Archives: math
Calculate Catmull-Rom splines using forward differencing
Update: Here’s a little JavaScript canvas example to give you some sourcecode… Splines are a nice for interpolation of all kinds of stuff. A very nice, thorough (Bezier) spline documentation with lots of examples can be found here.Catmull-Rom splines are handy, because they always pass through their control points. No fiddling with tangents and stuff.Continue reading “Calculate Catmull-Rom splines using forward differencing”
Ease functions
Ease functions are important for interpolation of just about anything. Popular functions are “smoothstep” or “ease in” and “ease out”. This images shows what they look like for x[0,1] and y[0,1]: There are other popular functions for ease in and ease out, e.g. y=sin(x*PI/2) resp. y=1-cos(x*PI/2).What is important about those functions is if they’re C1–Continue reading “Ease functions”