Point on Vector - Learn Maths Basics

  • Thread starter Thread starter frogtag
  • Start date Start date
  • Tags Tags
    Point Vector
frogtag
Messages
17
Reaction score
0
Hi,
This may seem very basic, but it's been a few years since i did A-level maths!
I'm trying to remember how to work out if a point falls on a vector? I can't remember any of the terms so any info would be appreciated.

thanks
 
Physics news on Phys.org
Welcome to PF!

Hi frogtag! Welcome to PF! :smile:

Well, if you have the equation for a line, and you want to know whether (3,5,6) lies on it, just put 3 5 and 6 into the equation and see if it works.

(Or did you mean something else? … if so, give an example :wink:)
 
Thank you tiny-tim,

Taking the idea of an equation ... I reseached this:

Two points A & B, with a directional vector of AB.
Point ? is the potential bisecting point

x? = xA - (xB)t
y? = yA - (yB)t
z? = zA - (zB)t

The way I see it, (only using x for simplicity) xA is the initial point of the vector and xB is the terminal point. t is a value that holds the values 0 at xA and 1 at xB. Now if x? is on the vector then when you work out the maths then 0 =< t =< 1?

Can anyone clarify this for me please
 
Hi frogtag! :smile:

(try using the X2 tag just above the Reply box :wink:)
frogtag said:
… The way I see it, (only using x for simplicity) xA is the initial point of the vector and xB is the terminal point. t is a value that holds the values 0 at xA and 1 at xB. Now if x? is on the vector then when you work out the maths then 0 =< t =< 1?

Those equations aren't quite right …

you need x = txA + (1 - t)xB etc …

(this is the parametric equation of the line, with of course t as the parameter)

so at t = 0, x = xA, and at t = 1, x = xB :smile:
 
Too say I'm rusty is an understatement!

Using x = txA + (1 - t)xB

surely when t = 0, x = xB not x = xA?

at t = 0 ...

0 * xA = 0 and this is canceled out, but (1 - 0) = 1 and 1 * xB = xB, so x = xB?

at t = 1 ...

1 * xA = 1, but (1 - 1) = 0 and 0 * xB = 0, this part is canceled out leaving x = xA?

I'm guessing I'm not grasping this concept properly!

Also I'm thinking i have to solve the equation to separate t, ie (simple equation example)

5 = t*9

5 / 9 = t

t = 0.5 reocc.

Like this but with the equation you sent?
 
Last edited:
frogtag said:
when t = 0, x = xB not x = xA?

yes, i wrote it the wrong way round! :redface:
Also I'm thinking i have to solve the equation to separate t, ie (simple equation example)

5 = t*9

5 / 9 = t

t = 0.5 reocc.

Like this but with the equation you sent?

I'm not sure what you're trying to solve, but whatever it is, yes, you solve by getting all the t on one side. :smile:
 
This equation will be for a computer AI program. The idea I have is that the vector represents a characters line of sight. Point A in the person. Point B is where they can see to. Now I want to be able to test to see if another person crosses the vector/the line of sight. Now using the equation:

x = txA + (1 - t)xB

xA is the person.
xB is the furthest point of sight.
x is the person crossing the vector.

The only variable I have left is t, so what i need to do is isolate t so that i can test its value to see if it's within the ranges of 0 to 1 and thus within the person line of sight.

Just having difficulty with the equation. More than willing to do the hard work if you could point me in the right direction?

This is what I've got so far...

1 - ( x - (txA) / xB ) = t

not great ... and probably not right?!
 
Last edited:
frogtag said:
This equation will be for a computer AI program. The idea I have is that the vector represents a characters line of sight. Point A in the person. Point B is where they can see to. Now I want to be able to test to see if another person crosses the vector/the line of sight …

I don't get it. :confused:

Is x stationary, or is x a line?

(and do these characters only see dead-ahead of themselves?)

If x is a line, it will need another parametric equation (with a parameter u, say, instead of t), and then you can ask whether the two lines cross.
 
Is x stationary, or is x a line?

Because its a computer program I have to use timed intervals to check on the position of x to see where it is. It's like taking a film of a ball moving and checking each frame to see where the ball is. So x will be considered a staionary point.

(and do these characters only see dead-ahead of themselves?)

For the moment yes. The process I'm taking is to develop the visual parameters bit by bit. For this moment, version 1.0, my basic visual parameter is a single line of sight from the person to a set point directly ahead of them. The next versions will see detection of a point within a fan. Then expanding to peripheral vision, so several fans, etc... I think its better to crawl before I walk!

I looked at my old equation and saw I made a mistake. It should have read:

x = xA + (xB-xA)t

will this work instead of

x = txA + (1 - t)xB

because I don't understand the concept of your equation. Mine seems more simple, and with it there is only one t and I'm able to isolating it, as such:

x - xA
------- = t
xB - xA

then, the way I see it, if the t value is the same for x, y and z equations, then point [x,y,z] will sit on the vector/line?
 
  • #10
frogtag said:
I looked at my old equation and saw I made a mistake. It should have read:

x = xA + (xB-xA)t

will this work instead of

x = txA + (1 - t)xB

Yes, they're the same. :smile:
x - xA
------- = t
xB - xA

then, the way I see it, if the t value is the same for x, y and z equations, then point [x,y,z] will sit on the vector/line?

oh i see what you mean …

yes, if (x - xA)/(xB - xA) = (y - yA)/(yB - yA) = (z - zA)/(zB - zA),

and if that value is between 0 and 1,

then (x,y,z) lies between A and B :smile:
 
  • #11
Marvellous. Thank you kindly for your help Tiny-Tim, you're a star! :biggrin:
 
Back
Top