PDA

View Full Version : TRIG utility nodes?


DangerAhead
10-26-2006, 09:36 PM
Is there any way to get the value of trig functions from any utility node?

Are there any trigonometry utility nodes?
Anybody have some Trigonometry Utility Nodes?

I don't want to use an expression because I'm getting errors when I'm dividing by zero, but sometimes zero is what I need to pop into my "Law of Cosines" experiment.

I read someone a while back you could get cosine and sine from facing ratio, but I'm not sure about that.

tbaypaul
10-27-2006, 01:59 AM
well, I think you answered your own question...facing ratio is 1 when the ray is parallel to the surface normal and 0 when it is perpendicular ....so the 1 is at 0deg and 0 is at 90deg which is exactly the behaviour of cosine. The sine is the inverse. So facing ratio should give cosine and piped thru an inverse gives sine.

also I attched this node that I made....I am making no promises...they were a first stab at the api. maya 7 and 8 ..... use by executing "createNode psine;" and "createNode pcosine;". (I should have made separate nodes each with it's own plugin name...dumb) The input is radians of rotation so you may have to premultiply by a conversion factor before the node input.

But I bet you want to input the ratios and have the sin or deg output? Right?

CGTalk Moderation
10-27-2006, 01:59 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.