Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Tangent Angle

Tangent Angle

2004-02-18       - By Sean Donnelly

 Back
Reply:     1     2     3     4  

If you bear with me I'll try and describe it.  As Kim says its some trig
function (arctangent) which returns the value in radians.  So you must convert
it to degrees (multiply radians by 180 / pi).

So it would be something like this.  Be careful with the left & right most keys
as they have zero tangents on one side (so you'll get a divide by zero).

frameRate = GetValue("Playcontrol.rate")
LogMessage "Frame rate = " & frameRate & vbcr

set collection = GetSource("null.kine.local.posx",siFCurveSource)
for each fcurve in collection
  GetFCurveInfo fcurve, crvtype, nokeyval, nbKeys, extrap, segtype, lowclamp,
highclamp

  for i = 1 to nbKeys - 2
    GetKeyInfo fcurve, i, parameter, leftval, rightval, lefttanparam, lefttanval,
righttanparam, righttanval, rightsegkind, constraints
    LogMessage "Key " & i & " Tan Angle = " & Atn( lefttanval / ( lefttanparam *
frameRate ) ) * 180 / 3.141592 & vbcr
  next
next

If you are using "Express slopes as ratio as in SI|3D" then its just the
tangent value / tangent param:

    LogMessage "Left Tan Angle = " & ( lefttanval / lefttanparam ) & vbcr

Sean

-- --Original Message-- --
From: owner-xsi@(protected) [mailto:owner-xsi@(protected)]On Behalf
Of kim aldis
Posted At: Tuesday, February 17, 2004 4:45 PM
Posted To: xsi
Conversation: Tangent Angle
Subject: RE: Tangent Angle


I would imagine they're tangents, though, so probably some trig function of
RightTanY and Right would do it for you. Same for left, obviously.

> -- --Original Message-- --
> From: owner-xsi@(protected)
> [mailto:owner-xsi@(protected)] On Behalf Of Jabbar Raisani
> Sent: 17 February 2004 21:23
> To: XSI@(protected)
> Subject: Re: Tangent Angle
>
> Here's what I found with a little searching in the SDK doc.
> Hopefully this can get you started on the right path.
>
> // determine if key has zero slope
>   var bZeroSlope =
>      ( (oKey.LeftTanY==0) && (oKey.RightTanY==0) );
>
> If you need more I think the SDK docs could be useful .
>
> >Jabbar
>
> -- -- Original Message -- --
> From: "Sascha" <sa@(protected)>
> To: "XSI-List" <xsi@(protected)>
> Sent: Tuesday, February 17, 2004 5:32 AM
> Subject: Tangent Angle
>
>
> > How can I calculate the angle of the tangent of a fcurve
> key in XSI? An
> > example would be nice.
> >
> > Sascha
> >
> > ---
> > Unsubscribe? Mail Majordomo@(protected) with the
> following text in body:
> > unsubscribe xsi
>
> ---
> Unsubscribe? Mail Majordomo@(protected) with the following
> text in body:
> unsubscribe xsi
>
>
>



---
Unsubscribe? Mail Majordomo@(protected) with the following text in body:
unsubscribe xsi

---
Unsubscribe? Mail Majordomo@(protected) with the following text in body:
unsubscribe xsi