View Full Version : Nodal - InvSin, etc..?

RebelHill

01-15-2011, 04:06 AM

Maybs I shoulda posted this in the node section, but maybe it'll get more traffic here...

Anyhow.

So there I am, playing silly buggers, and thought, wouldn't it be fun if I tried to put together an IK solver using the node editor.

Now whilst the node editor has math functions for sin, cos, tan, etc... which quite happily convert deg values into sin -1>+1 values... Im at a loss for how to make the inverse functions, invSin, invCos, etc... to convert these -1>+1 values back into degs...

You can't, ofc, just use a math>invert node, as that just inverts the output number, not the function itself.

So... any ideas... anyone?

thanks.

RebelHill

01-15-2011, 04:50 AM

I'm a dumbarse...

ArcSin, etc... Staring me right in the face.

Too much time with the lil "inv" button on my calculator.

Calculators make you stupid.

jeric_synergy

01-16-2011, 12:59 PM

So there I am, playing silly buggers, and thought, wouldn't it be fun if I tried to put together an IK solver using the node editor.

???? So, would this be applied in the Nodal Displacement, uhhhhh, feature?

(I can't even conceive how this would be possible, but I'll take your word for it. Once words like "ArcSin" gets tossed around, I'm out.)

RebelHill

01-16-2011, 01:59 PM

Well, no... it'd be applied to the rotation channels of.. whatever , using the node item motion plugin.

As for things like ArcSin, et al... you'll get on a LOT better with a LOT of stuff in 3d if you learn yourself some math basics... the sin function, or more correctly "sine" is really easy to understand... see this graphic...

http://en.wikipedia.org/wiki/File:Sin_drawing_process.gif

By drawing a triangle from the centre of a cirlce to its edge, and using the diameter of the circle to represent a graph line going from -1>1... you can relate the rising angle of the triangle into a 0-1 value... and that's all sine is, just another way to analyze the "workings" of the geometry of a triangle.

So the sin tool simply converts an angle in degrees into a sine value between -1 and +1... and arcSin (or inverse sin) just does the conversion back the other way.

jeric_synergy

01-16-2011, 11:04 PM

Man, if I gotta learn trig, I'm in the wrong business. If I was doing a lot more scripting, perhaps.

RebelHill

01-17-2011, 05:11 AM

Well, you don't have to learn it... but doing so will give you access to being able to do more stuff. Generally anything to do with handling either angles or vectors is good to know.

But the simple fact is that certain things in 3D, that I see you trying to get help or understanding of, you will NEVER be able to understand unless you understand at least the principles of the math behind them. And these underlying principles... like trig, really aren't that difficult at all.

Powered by vBulletin® Version 4.2.3 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.