CCurve - GetTangents, CalcHermite



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 20/11/2007 at 08:15, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R10 
    Platform:   Windows  ;   Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    So, why are CalcHermite() and CalcSoftTangents() included if it is strongly advised to use GetTangents() instead?

    What does GetTangents() actually do? Does it change the tangents on spline interpolated keys or just return the Left-Right Time and Value settings?

    I'm trying to calculate continuous (considered over multiple keys) Hermite tangents to more closely match the input format (Poser's). First, I can't verify that Poser aninmation spline interpolation uses Hermite curves - but since Bezier and B-Spline control points are not necessarily on the curve, this is the only candidate so far. Second, I have no idea how Poser calculates tangents so as to be continuous - that is, if you change the value or time of a key, the complete curve across keys is recalculated. I can only suppose that this will be the case here as well.

    Any information while I'm frustratingly experimenting would be appreciated.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 20/11/2007 at 17:16, xxxxxxxx wrote:

    Now I'm trying Catmull-Rom spline interpolation. Okay, have some code which considers nonuniformly spaced keyframes in this regard. But...the tangent is calculated as a 'Gradient' (a real value). How would I use this or calculate differently to get the (x,y)=(relative-frames,value) required by R10's animation Spline interpolation Left and Right Time/Value settings? Heh? Heh? ;)

    How can a single value specify a tangent (vector) - at least not without some baggage being omitted for the naive at heart (me)?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 20/11/2007 at 21:01, xxxxxxxx wrote:

    Hmmm, I'm still confused. :) Splines are not my forte. Cubic Splines look to be a more accurate description of what I'm looking for:

    "Cubic Splines exhibit global control through the fact that moving one of the control points affects the entire curve." - "Mathematics for 3D Game Programming and Computer Graphics"

    But, let's just say that the easier ones were bad enough. Having to set two values to represent the tangents rather than plotting the curve itself is not exactly given in texts or code. I just need a singular setup here on import - after that the keys can be adjusted as the user desires.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 21/11/2007 at 08:08, xxxxxxxx wrote:

    I see that Gradient = dy/dx = tan(angle). I was hoping that it represented a direction cosine or similar. What to do about the tangent vector magnitude?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 22/11/2007 at 11:40, xxxxxxxx wrote:

    Natural Spline (C2 continuous) using the first derivative to get the tangent vector. :)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/04/2009 at 23:39, xxxxxxxx wrote:

    Did you end up with TCB values from this one or did you do something else? It looks like I have the math for calculating t0 and t1 for a hermite curve but I cannot figure out how to translate the left & time values into Accurate TCB values.


Log in to reply