Angle between two 2D points

Started by
36 comments, last by ma_hty 14 years, 7 months ago
Aye, that's a fair criticism - I was trying to avoid using over-technical language, but I guess anyone using vectors for game programming is going to need to get technical at some point! I will go through it and try to reduce instances of vague or imprecise language. I also intend to include diagrams, as a picture is worth a thousand words, as they say. Thanks.
Advertisement
Quote:Original post by dragongame
Quote:Original post by Interesting Dave
... "angle of vector between two points"


A single vector (it does not matter where it came from) has no angle!
So you mean to say, that the angle of a vector between two points and the ?-axis, where ? could be x or y, dependent on the convention used.

Sorry to be a pain in the ass but this thread is kind of funny.


What are you talking about "it has no angle"? A vector has direction and magnitude. Is it not this direction that we are talking about?

<edit>nevermind, forgot you're a pedantic math-nerd :)

Why though, is it so hard for you lot to just assume, when talking about a single vector (or point for that matter) that the "angle" is simply that between the vector/point and the origin? It's completely unambiguous, so why not?</edit>

Sorry to say it but this thread is full of wanky math-nerd talk and to be honest you all ought to be a little less pedantic. Yes, I understand that this is the math and physics forum so said behaviour is to be expected, but it's getting ridiculous here.
Quote:Sorry to say it but this thread is full of wanky math-nerd talk and to be honest you all ought to be a little less pedantic. Yes, I understand that this is the math and physics forum so said behaviour is to be expected, but it's getting ridiculous here.


The thing is, the original question caused a little confusion as to which answer you wanted, due to the imprecise language, and it's something that could cause you further confusion in the future if the separate concepts of points and vectors aren't clear in your head. I'm afraid 'wanky math-nerd talk' is what you're going to get here if you're not clear in what you want from the wanky math-nerds ;)
Quote:Original post by _Sauce_
Why though, is it so hard for you lot to just assume, when talking about a single vector (or point for that matter) that the "angle" is simply that between the vector/point and the origin? It's completely unambiguous, so why not?</edit>

It's funny because this is the correct assumption, but it's not what you need.

Assume your sprite is at A(0, 1) and your mouse at B(1, 0)
The angle you're looking for is 45 deg
However, the angle between those points/vectors is 90 deg.

[Edited by - janta on August 24, 2009 3:40:09 PM]
Quote:Original post by _Sauce_
Quote:Original post by dragongame
Quote:Original post by Interesting Dave
... "angle of vector between two points"


A single vector (it does not matter where it came from) has no angle!
So you mean to say, that the angle of a vector between two points and the ?-axis, where ? could be x or y, dependent on the convention used.

Sorry to be a pain in the ass but this thread is kind of funny.


What are you talking about "it has no angle"? A vector has direction and magnitude. Is it not this direction that we are talking about?

<edit>nevermind, forgot you're a pedantic math-nerd :)

Why though, is it so hard for you lot to just assume, when talking about a single vector (or point for that matter) that the "angle" is simply that between the vector/point and the origin? It's completely unambiguous, so why not?</edit>

Sorry to say it but this thread is full of wanky math-nerd talk and to be honest you all ought to be a little less pedantic. Yes, I understand that this is the math and physics forum so said behaviour is to be expected, but it's getting ridiculous here.


Mmm... funny Sauce...

A lot of people had already pointed out the problem of your mysterious custom re-interpretation of the well known idea. With your mysterious re-interpretation (which is half written and half still resided in your brain), others will have difficulties to understand what you are trying to say.

When you write something on behave of a programmer, it is okay to be less precise conceptually provided that ideas still can be understood. Apparently, you mysterious re-interpretation is not this case.

By the way, if you really wanted to interpreted a well know idea differently, you should tell the others clearly at the very first beginning. It is the proper way of doing it. However, even if you did it properly in this case, the re-interpretation is still damn odd.

PS: I'm, actually, a little bit confused. Is the text you posted here really intended for the others to read? Or, is it just some kind of secret diary for yourself only?

[Edited by - ma_hty on August 24, 2009 3:09:07 PM]
Quote:Original post by janta
Quote:Original post by _Sauce_
Why though, is it so hard for you lot to just assume, when talking about a single vector (or point for that matter) that the "angle" is simply that between the vector/point and the origin? It's completely unambiguous, so why not?</edit>

It's funny because this is the correct assumption, but it's not what you need.

Assume your sprite is at A(0, 1) and your mouse at B(1, 0)
The angle you're looking for is 45 deg
However, the angle between those points/vectors is 90 deg.

Now it's my opportunity to be pedantic - if you look carefully, then what I asked for in the OP was the angle between two points - not the angle of a single vector / point. I'm simply clearing up what someone else said. When referring to one point / vector, the language is completely unanmbigious. As for the angle between two points, I can see how such terminology is ambiguous and in future will try to be more specific.

Thanks all for your help anyway. Should be noted that I've just woken up - I didn't have the best sleep, but I'm feeling a little less frustrated now.

I imagine the confusing parts of my OP were the fact that I specified that I needed "the angle between two points ..." I suppose "between" isn't exactly the word I wanted either. Was there anything else that tripped some of you guys up? What would be an appropriate substitution for between?
We do have a specific name for the vector representing a particular point in a space. You may call it position vector.
Quote:Original post by _Sauce_
... I'm simply clearing up what someone else said. When referring to one point / vector, the language is completely unanmbigious. ...


This is ambiguous except for vectors in a 2D space with x-axis and y-axis. In this exceptional case, the angle of a vector is measured from positive x-axis conventionally.

This topic is closed to new replies.

Advertisement