Home » Community » Forums » » The World of 3-D Graphics Part 2: Vectors and Planes
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 The World of 3-D Graphics Part 2: Vectors and Planes
Post Reply 
Mmm...

The vector <2,4,0> is not the vector drawn in the first and second graphics of this article. Indeed, the vector <2,4,0> is the vector connecting the origin to the coordinate (2,4,0). Had the author represented each component vector in red and then the final vector in (for example) blue, then this would have been correct also and represented the point I believe he was tring to make.

Additionally, the operations in the article denoted 'vector multiplication' and 'vector division' are not legitimate mathematical operations. In fact, multiplication and division are not defined for vectors.

Regards,

Timkin

Edited by - Timkin on July 26, 2001 2:49:52 AM

 User Rating: 1509   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Indeed you are correct as you can imagine this is quite embarrasing. I don't want to lead any beginners astray . While I won't patronise anyone with excuses, I will however get those mistakes taken out immediately.

Sorry for any inconvience.

- David

 User Rating: 1029   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

From the second page:

> The Dot Product is a vector operation which will return a
> scalar value (single number), which is equal to the cosine of
> the angle between the two input vectors.

This is only true for two unit vectors. The formula:

> U . V = |U| * |V| * cos(a)

is correct but it is not explained. You can give the formula for the angle, i.e. a = arccos (U.V / (|U||V|)), as an application and to help explain it.

Also the cross product has a similar and very simple justification: it's magnitude is |U||V| sin(a), which is the area of the parallelogram/2x the area of a triangle with U and V as edges, easy to show on a diagram.

The end of the plane page is not very clear. Provided N is a unit vector the formula

V . N + D

gives the signed distance to the plane, which tells you how far the point is from the plane as well as which side you are on, and if it equala zero that the point is on the plane.

 User Rating: 1169   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

> Additionally, the operations in the article denoted 'vector
> multiplication' and 'vector division' are not legitimate
> mathematical operations. In fact, multiplication and division
> are not defined for vectors.

They're in our APIs and I use them. To convert from angular velocity to angular momentum you multiply by the inertia tensor. This is a 3x3 matrix but with the correct choice of axes it becomes a diagonal matrix, and instead of using a matrix I use a vector for it and a 'vector multiply'. Other uses include applying lighting to coloured surface and scaling between displays with different aspect ratios. You could use matrices in each case but vectors are far quicker and require 1/3 the storage and memory bandwidth.

 User Rating: 1169   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Hey,

Just wanted to congratulate you on another post. Although there might of been a few initial technical issues, you survived fairly unscathed (considering the technical knowledge of the people who read these articles). This whole series should be a valuable to anyone who wants to learn the concepts modern games.

Anyway -- keep the articles coming.
Deepdene

 User Rating: 1086   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:
Original post by johnb
> Additionally, the operations in the article denoted 'vector
> multiplication' and 'vector division' are not legitimate
> mathematical operations. In fact, multiplication and division
> are not defined for vectors.

They're in our APIs and I use them. To convert from angular velocity to angular momentum you multiply by the inertia tensor. This is a 3x3 matrix but with the correct choice of axes it becomes a diagonal matrix, and instead of using a matrix I use a vector for it and a 'vector multiply'. Other uses include applying lighting to coloured surface and scaling between displays with different aspect ratios. You could use matrices in each case but vectors are far quicker and require 1/3 the storage and memory bandwidth.


That's an entirely different issue than presented in the article. It is NOT correct to tell someone that 'here is the mathematics of vectors' and then to tell them something that is plainly not legitimate mathematically.

In your example of your 3x3 inertia tensor you are still performing a matrix multiplication (although you are representing only the non-zero terms in your computation). You can "CALL" it a "vector multiplication", but that is a poor choice of terminology. Since the article was written for beginners one would expect that correct terminology is used, or where it is not, it is cleary identified that the terminology is specific to an interpretation of a particular sort of problem and not strictly correct in the mathematical sense.

Personally, I think that if someone is going to teach something, they should make sure they lay the correct foundations.

Regards,

Timkin

 User Rating: 1509   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Hi to all!

I understand the fist examples with the vectors but i can't understand for what i can use the last instructions (plane) and for the last picture there is no sourcecode

thx and bye

Thomas


 User Rating: 1015    Report this Post to a Moderator | Link

Hi to all!

I understand the fist examples with the vectors but i can't understand for what i can use the last instructions (plane) and for the last picture there is no sourcecode

thx and bye

Thomas


 User Rating: 1015    Report this Post to a Moderator | Link

Hi to all!

I understand the fist examples with the vectors but i can't understand for what i can use the last instructions (plane) and for the last picture there is no sourcecode
I wish me and for other newbies more examples to understand this vector- and planeoperations.

thx and bye

Thomas


 User Rating: 1015    Report this Post to a Moderator | Link

Hi to all!

I understand the fist examples with the vectors but i can't understand for what i can use the last instructions (plane) and for the last picture there is no sourcecode
I wish for me and other newbies more examples to understand this vector- and planeoperations.

thx and bye

Thomas


 User Rating: 1015    Report this Post to a Moderator | Link

Hi to all!

I understand the fist examples with the vectors but i can't understand for what i can use the last instructions (plane) and for the last picture there is no sourcecode
I wish for me and other newbies more examples to understand this vector- and planeoperations.

thx and bye

Thomas


 User Rating: 1015    Report this Post to a Moderator | Link

> In your example of your 3x3 inertia tensor you are still
> performing a matrix multiplication (although you are
> representing only the non-zero terms in your computation). You
> can "CALL" it a "vector multiplication", but that is a poor
> choice of terminology.

In my code there are no matrices, just vectors, so I don't know how I'm performing matrix multiplication. For a general implementation of the moment of inertia you need matrices, but with the correct choice of axes vectors produce the same results with more effiecient code, far more important than what it's called.

And it was only one example. Another, perhaps better as it's easier to explain, is applying a coloured light to a coloured surface. E.g. a yellow light (1.0, 1.0, 0.0) on a cyan surface (0.0, 1.0, 1.0) looks green (0.0, 1.0. 0.0). The last vector is the vector product of the first two. In the real world perfectly white lights and perfectly white surfaces are very rare, so this has very general application.

 User Rating: 1169   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

You can call these things vectors but that doesn't mean that they ARE vectors (in the mathematical sense). In your code, a vector is just the name you give to a certain sort of array, or some other container class. Mathematically speaking, a vector is defined by it's mathematical properties and you cannot divide one vector by another, nor is an element by element multiplication a 'vector multiplication'. You can of course, do an element by element operation of members of a container class but that is not a mathematical operation on the class, but rather on elements of the class. Each operation is independent of the others. It is clear that what you are calling a vector is not actually a vector, but rather just a nice neat storage class for performing certain computations.

Here's a question for you. I have two arbitrary MxN matrices A and B. What is the result of A/B if M and N are both greater than 1?

Now take your result, call it C. It should be the case that A=B*C where B*C is the usual matrix multiplication operation. For vectors and matrices there exists no such C defined as A/B.

The point of the article was to explain vector mathematics (which would later be used in graphics programming). If someone is going to teach mathematics, then they should do it properly. If on the other hand the article was about storage classes, then it would be an entirely different matter.

Regards,

Timkin

Edited by - Timkin on July 30, 2001 10:45:40 PM

 User Rating: 1509   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Another little error.

On the optimization, it is true that multiplication is faster than division, but not by enough that 1 division and 3 multiplications is faster than 3 divisions. In fact, I don't even know that division is any slower than multiplication.

-MSkinn99

What's done is done (Until you hit Undo)
Two wrongs don't make a right; but 3 lefts do.
You'd be paranoid too if everyone was out to get you.


Yet another game programming web page...

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

despite these little mistakes, i'm waiting for the next article..

more more !! i want more.
even if i studied vectors and matrices, it's a good thing to see it again after monthes (years..).

great job, bully !

what samples will you use ? a little game or something like that ?

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I have been studying C++ since October of last year and went into DirectDraw. About 2 months ago, I began Direct3D, and although your first article was "simple", it's good to get a foothold somewhere so that novices like myself feel like they have a foot hold on what you are/going to talking about instead of starting out lost. Keep up the good work. Even with the mentioned mistakes, I pretty much understand what you are talking about and am looking forward to future articles.

Paladin

Edited by - sirPaladin on August 16, 2001 2:42:08 PM

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Sorry for the bother... but I love the fact that there is a serices out there that will teach (show) someone how to play around with 3D stuff. I know that OpenGL and DirecX are there to make life easy... but I am one of those people who wants to know what does each function do and how much time it saveing me by using it. (in other words..... I want to do things the hard way so that I can see the value of the ready made stuff out there)

But for some resone, after the serices have started it died?? is there ever going to be a Part 3 in the serice?? I am that there will be..

Any way... thanks to the author for the small start he gave us :-)

Thanks again

(the one everyone love to hate... but can't :-) )

 User Rating: 1015    Report this Post to a Moderator | Link

nice... but how to do reflected vector from the plane ?? :(
i need this. if you know - kabzik@o2.pl
thx

 User Rating: 1015    Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: