Advertisement

Math Notation The Easy Way!

Started by June 29, 2003 10:06 AM
14 comments, last by spudulike 21 years, 7 months ago
Hi, I''ve just bought the Real-Time Rendering Book and I''m struggling slightly because, as you can guess, there is a lot of math equations in there and I''m not all that good at math! I would like to know if anyone has any links the can explain what the different notations mean so I can understand what an equation is doing, be able to read it, and therefore turn it into code. The book explains why we are using a particular equation, but not how it works as it assumes the reader will understand it. Example: [ Algebra ] c = (ab) + 1 [ C++ ] c = (a * b) + 1 I hope you understand what I''m talking about ... I want to read algebra and turn it into C++ without fully understanding the specifics of algebra. Just like being able to read a different language, but not being able to write a letter! Thanks, Mike
geez, i really can''t see the sense in wanting to learn how to convert algebra into C code without understanding algebra. I don''t know if it''s possible, and even if it is i cannot see why it would be desirable. I know it may seem frustrating to have to learn something else before you can program, but it really is neccessary and you won''t really be doing any graphics programming until you understand how algebra works, in and out.
GSACP: GameDev Society Against Crap PostingTo join: Put these lines in your signature and don't post crap!
Advertisement
Hi,

I''m the type of person who likes to see quick results and being able to read algebra and turn it into code gives me those results.

What I mean, forgive me if these are not exact, is:

Dot Product Equation: P.Q = PxQx + PyQy + PzQz
C++ Code: dot = ( p.x * q.x ) + ( p.y * q.y ) + ( p.z * q.z )

Now, I can read the dot product equation and so can turn it into C++ code and after reading the explanation in the book I understand what the dot product is used for.

I don''t want to learn, at this point anyway, how write equations or why equations are formed the way the are. I believe that it is possible, at the most basic level, to look at PxQx and understand that here we are multiplying the x component of P against the x component of Q.

Regards,

Mike
Honestly, if you don''t understand equations like: "c = (ab) + 1" which is also known as: "y = mx + b" you''re not going to go very far in graphics. The truth of the matter is that graphics is 99.99% math. The equation you gave for a dot product is fine and all, but also completely useless. Unless you know what a dot product represents and the laws you can use, its just a useless number. I''m also an advocate of understanding the reasoning behind the laws, though I suspect 99% of the people on this board could not tell you ''why'' you''re able to find the angle between two vectors from a dot product.

You might be able to BS a bit of the math involved, but if you''re not going to bother understanding what you''re doing why not just cut and paste somebody else''s code? There''s not much difference. You will not understand what you''re doing unless you take the time out to learn the theory and math behind it.
Simply learn the order of operations in algebra and then the different operators in C++.

/ = divide
* = multiply
+ = add
- = subtract
() = do this first

Use a lot of parenthesis to make sure everything gets calculated in the correct order.

Just a little note: I know its possible to learn vectors and vector operations before hand, but traditionally they are taught after Trig, Cal1 and Cal2 in a class called Calculus 3 or Vector Calculus. You wind up using a lot of Trig.

If you don''t plan on understanding the math, I suggest downloading a library or project that has working code. Debugging without understanding the math is terrible. From what I understand, seasoned programmers still have troubles with Matricies, which is an advanced form of linear algebra (ie no calculus involved).
quote:
Original post by haro
"c = (ab) + 1" which is also known as: "y = mx + b"
I had never seen that before. I''m interested in your interpretation.
quote:
Original post by haro
The truth of the matter is that graphics is 99.99% math.

I find that number interesting, but for different reasons. Please don''t infer anything about what I''m going to say about your post.

I find 99.99% amusing because of a June edition Scientific American article. You see, the speed and power of applications are doubling every 18 or so months. However, the reliability of applications arn''t. So there has been a endevour by researchers to develop more stable applications.

The 99.99% comes in with the rating of applications. They are talking about how soon applications will ''feature'' different reliability ratings based on a scale of nines. 99.00% is refered to as "two-nines", 99.90% is "three-nines", 9999% is "four-nines", and 99.999% is "five nines".

"Two-nines" means that in 25 years, a continously running application will be down for a total of 4 days. That is, rebooting to fix the problems and powering staright back up into the program.

"Three-nines" equates to 9 hours.

"Four-nines" = 1 hour;

"Five-nines" = 5 minutes.

I understand that 99.99% is a figure of speech, but by that rating system, that would mean that in 25 years of programming, you will spend 1 hour working on something not math related.

Anyways, here''s the article online with links:
http://www.sciam.com/article.cfm?colID=1&articleID=000DAA41-3B4E-1EB7-BDC0809EC588EEDF

Advertisement
quote:
Original post by Anonymous Poster
I understand that 99.99% is a figure of speech, but by that rating system, that would mean that in 25 years of programming, you will spend 1 hour working on something not math related.



Sounds like a somewhat banal article, and also wrong. 0.01% of 25 years would be more than twenty times that amount, but who is counting? Admittedly the number is an exagerration but for a programmer working exclusively in graphics I don't think it would be an exagerration to say between 40-70% of all work will be mathematically oriented. I tend to put the number at around 90%, but I also have a habit of equating mathematics and computer science all together.

[edited by - haro on June 29, 2003 1:19:12 PM]
quote:
Original post by haro
Sounds like a somewhat banal article, and also wrong. 0.01% of 25 years would be more than twenty times that amount, but who is counting? Admittedly the number is an exagerration but for a programmer working exclusively in graphics I don''t think it would be an exagerration to say between 40-70% of all work will be mathematically oriented. I tend to put the number at around 90%, but I also have a habit of equating mathematics and computer science all together.

<SPAN CLASS=editedby>[edited by - haro on June 29, 2003 1:19:12 PM]</SPAN>


Right! Mathematically, it comes out to 21.915 hours. I have no clue how they get their numbers (other than reading the caption of what they mean).

Not meaning to hijack the thread though

Haro is right. Numbers are usually figures of speech when use percentages off the top of our heads, but he does have a point.

Most of the people who post here have no clue exactly how mathematical operations and equations work. However, some know enough about them to know when to use them.

Alos, graphics programming is primarily math orientated.

"Most of the people who post here have no clue exactly how mathematical operations and equations work. However, some know enough about them to know when to use them."

This comment is the point I''m trying to make and hence why I''m asking for the help.

Using the Dot Product example again, I understand what it is used for and when to use it, but what I don''t care about is HOW it works.

The fact that the equation gives me a measure of the difference between the directions in which to vectors point is all I care about.

Which brings me back to my original question. Can someone provide links that will give list of the most widely used notations used in the 3D graphics?

Example:
||P|| = The magnitude of a vector.

Then, if I see this in a algebra formula I know that they are talking about the magnitude of a vector.

Before I waste anymore of peoples time please tell me if my request is unreasonable or dumb!

Thanks,

Mike
Doesn''t your book have a math appendix? My 3d graphics book has one, and it isn''t great, but it is where I learned a lot of notation.
You know what I never noticed before?

This topic is closed to new replies.

Advertisement