I am required to interpolate weighted Hermite splines and I am having difficulty coming up with a formula that correctly calculates this with varying tangent angles.
Does anyone have a formula to calculate weighted tangents in python ideally without using scipy or numpy? Or perhaps a link to a pdf that explains the mathematics behind it? Thank you in advance to any advice given.
The data is coming from Autodesk Maya animation curves that need to be worked with outside of Maya. And yes I have worked with the animEngine.c that is included but it does not correctly calculate keys with tangents set to 'auto'
Here is some example data:
point: 0
time(x): 14
value(y): 8.535
inAngle: -48.7059321223
inX: 0.583333313465
inY: -15.9391937256
inWeight: 7.07152271271
outAngle: -48.7059355374
outX: 0.33333337307
outY: -9.10811233521
outWeight: 4.0408706665
point: 1
time(x): 22
value(y): -12.131
inAngle: -26.318250542
inX: 0.33333337307
inY: -3.95701789856
inWeight: 2.97504448891
outAngle: -26.318250542
outX: 0.416666686535
outY: -4.94627189636
outWeight: 3.71880531311
point: 2
time(x): 32
value(y): -0.369
inAngle: -1.40329438149
inX: 0.416666686535
inY: -0.244970053434
inWeight: 3.3343334198
outAngle: -2.02149523016
outX: 0.763025164604
outY: -0.646368861198
outWeight: 6.10800218582
And the same curve as non-weighted:
point: 0
time(x): 14
value(y): 8.535
inAngle: -48.7059321223
inX: 0.583333313465
inY: -15.9391937256
inWeight: 7.07152271271
outAngle: -48.7059355374
outX: 0.33333337307
outY: -9.10811233521
outWeight: 4.0408706665
point: 1
time(x): 22
value(y): -12.131
inAngle: -26.318250542
inX: 0.33333337307
inY: -3.95701789856
inWeight: 2.97504448891
outAngle: -26.318250542
outX: 0.416666686535
outY: -4.94627189636
outWeight: 3.71880531311
point: 2
time(x): 32
value(y): -0.369
inAngle: -1.40329438149
inX: 0.416666686535
inY: -0.244970053434
inWeight: 3.3343334198
outAngle: -2.02149523016
outX: 0.763025164604
outY: -0.646368861198
outWeight: 6.10800218582