Raised This Month: $32 Target: $400
 8% 

Vector Help - Check if point is between two vectors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
spunkster21
Senior Member
Join Date: Aug 2008
Old 07-27-2010 , 08:21   Vector Help - Check if point is between two vectors
Reply With Quote #1

I'm trying to determine if a point lies between two vectors and I'm not sure how to go about that in an efficient manner. Here's an example of what I'm trying to achieve, I hope it makes sense.

Vector 1: 100, 200, 100
Vector 2: 200, 100, 200
Vector 3: 150, 150, 150
Vector 4: 300, 100, 100

I want to know that vector 3 is between vectors 1 and 2, but vector 4 isn't because of its x coordinate.

Thanks.
spunkster21 is offline
neo_gis
Member
Join Date: Sep 2009
Location: Rabat
Old 07-27-2010 , 08:57   Re: Vector Help - Check if point is between two vectors
Reply With Quote #2

please make clear what you mean "between" two vectors ?
__________________
neo_gis is offline
Send a message via MSN to neo_gis Send a message via Skype™ to neo_gis
Scone
Senior Member
Join Date: Apr 2010
Location: England
Old 07-27-2010 , 09:37   Re: Vector Help - Check if point is between two vectors
Reply With Quote #3

If you're trying to tell whether a position vector C is on the straight line between position vectors A and B, just normalize the direction vectors AB and AC, then check them for equality.
__________________
Scone is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode