|
|
I came up with this today (Oct. 11), while adding that extra line the Slime
found was missing in normal.cpp. Look for the next to last function, called
Hermite_Cubic. It's called by Do_Slope_Map. This version saves 1
multiplication and 3 additions over the original one.
static DBL Hermite_Cubic(DBL T1,UV_VECT UV1,UV_VECT UV2)
{
DBL T0 = T1 - 1;
DBL rv;
rv = S2 * T0 + (P1 - P2) * (2.0 * T0 - 1);
rv = T1 * rv + S1 * T0 * T0;
rv = T1 * rv + P1;
return (rv);
}
--
Anthony Bennett
Post a reply to this message
|
|