Math is at the heart of rigging. Sure, Maya's native functions will do a lot of if for you, but if you wanna go plus-ultra with your rigs, it will mean getting your hands dirty.
I'll assume you still remember the basics from school - whoever you are.
Stuff like how to square numbers, what a square root is, that a negative number multiplied by another negative number yields a positive number. etc.
You might already know all about the subject of this post. If not, it's well worth learning, because it's the bedrock of a looooot of other math. Seriously, the amount it shows up in other areas is ridiculous.
I'm talking about this bad boy:
The Pythagorean Theorum.a2 + b2 = c2
Named after Ionian mathematician Pythagoras. What a sexy name.
So let's back up. Today's all about triangles.
We have names for the different configurations of triangles.
An 'equalateral triangle' is a triangle whose sides are all the same length.
An 'isosolese triangle' is a triangle with only two sides the same length.
Blah blah blah, no one cares. I certainly don't. I had to look that up just now!
Only thing I want you to focus on is what's called a 'right triangle'.
If a triangle has a 90 degree corner, the two remaining corners must each measure less than 90 degrees (because the sum of all angles of a triangle always adds up to 180 degrees.
The longest side of a right triangle will invariably be opposite the right angled corner. The name of that longest side is the 'hypotenuse'.
The all important hypotenuse.
So say you know the length of the two other sides - the sides that are not the hypotenuse. From here, how can we figure out the length of the hypotenuse?
Why, by using the Pythagorean Theorem.
So we typically label the lengths of each side of the right triangle with variables a, b, and c, with c being the length of the hypotenuse. The other two sides, the a side and the b side, are completely interchangeable. It doesn't matter which is a and which is b.
Now the Pythagorean Theorem states that for any right triangle...
The square of the
hypotenuse is equal to
the sum of the squares of the other two sides.
(Yeah, don't try to remember it by quoting Homer or the Scarecrow, that quote is famously full of errors.)
Let's break that down. On one side of the equation is the length of the hypotenuse (c) squared. And on the other side of the equation is the lengths of the other two sides (a and b respectively) squared, and added together.
Let's put this to use.
Suppose we have a right triangle. We know the lengths of side a and side b.
a is 5 units, and b is 3 units.
52 = 25
32 = 9
Now lets add those squares together.
25 + 9 = 34.
Now according to the theorem, whatever c is, when we square it it will also equal 34.
And once we know that c2 = 34, we can get c by getting the square root of 34.
√(34) = 5.83095189485
Yeesh! Look at that long, ugly number. Imagine how hard it would have been to measure that with any kind of precision using a ruler.
And this theorem can be rearranged to solve for either of the other sides too. Suppose we already knew c, and we knew a, but we didn't know b. We would simply...
Square c to get 34
We know that 34 must also be the sum of the squares of a and b
We square a to get 25
We know that 25 + b2 = 34, therefore...
34 - 25 = b2 , therefore...
b2 = 9
Now we know the square of b, is 9, so b is the square root of 9
√(9) = 3
This might not seem like a big deal, but trust me, soooooo much of mathematics is based on this one simply observation. At the very least, this will help to understand (once I get to them) vector math, and pi.
Oh that's right. There will be pi.





No comments:
Post a Comment