MADjestic Posted November 13, 2006 Share Posted November 13, 2006 Hi there, (I am trying this in VOPs but actualy it doesn't matter) What I actually need is to use tangent to the surface - i.e. I need to determine the angle to pipe into my tangent. We've got a dot product that gives us cosine(angle) (if vectors are normalized) - is there any way to derive either the angle, or sine of the angle or anything that will allow me to use tangent? there's also vangle(); expression function but it doesn't seem to work in VEX/VOPs context (I get "undefined function error") again I can be justmissing something obvious... Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted November 13, 2006 Share Posted November 13, 2006 Since the dot product of two unit-length vectors gives you the cosine of the angle between them, then the arc-cosine of said dot product will give you the angle (in radians, don't forget). The arc-cosine is the function "acos()" in VEX (and it's in the Trig VOP I think). Is that what you're after? P.S: If, for some reason, you need the resultant angle in degrees instead of radians, then you can use the degrees() function to convert (not sure if there's a VOP for that one). Quote Link to comment Share on other sites More sharing options...
MADjestic Posted November 13, 2006 Author Share Posted November 13, 2006 Thanks, Mario This is all the inheritance of russian school - there were no arc* functions in traditional math. manuals - so I still have to fight this. Thanks, I will keep this in mind. Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted November 13, 2006 Share Posted November 13, 2006 This is all the inheritance of russian school - there were no arc* functions in traditional math. manuals - so I still have to fight this. Now that you mention it, I suddenly realize that I have no idea why it's called "arc" and not just "inverse" (well, inverse is also used, but arc is more common). Mathworld says there are two principal branches, so maybe "arc" is used to distinguish the positive branch? (but then what's the negative one called? "EvilCoz?)... Who knows... maybe just a geometrical history quirk... <*shrug*> Edit: Oh wait... maybe it just refers to the arc length between the two vectors (two radii, or two sides of an equilateral triangle) -- and of course, the arc length *is* the angle (in radians), so... maybe <shrug^2>... Quote Link to comment Share on other sites More sharing options...
rjpieke Posted November 14, 2006 Share Posted November 14, 2006 Oh wait... maybe it just refers to the arc length between the two vectors (two radii, or two sides of an equilateral triangle) -- and of course, the arc length *is* the angle (in radians), so... maybe <shrug^2>... From what I remember, this is pretty much it, yeah. When this stuff was first introduced, the mathematicians were looking at the lengths of chords and arcs for wedges of a circle. This ended up in eq'ns (for a unit circle) like: chordLen = 2 * sin( theta/2 ) = 2 * sin( arcLen/2 ) arcLen = theta = 2 * invSin( chordLen/2 ) Ugh ... horrible memories Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted November 14, 2006 Share Posted November 14, 2006 chordLen = 2 * sin( theta/2 ) = 2 * sin( arcLen/2 )arcLen = theta = 2 * invSin( chordLen/2 ) Ugh ... horrible memories Cool! Thanks Rob! Nothing horrible about those memories of yours.... please share at will Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.