Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: √ ∞ ≠ ≤ ≥ ≈ ⇒ ∈ Δ θ ∴ ∑ ∫ π -

Login

Username

Password

Not registered yet?

#1 2005-08-05 03:04:32

ASh
Guest

parallel line

I need to make line B parallel to line A. I have start and end coordinates of line A and start coordinate of line B. Can I calculate the end coordinate of line B to make it parallel to line A. I also have end X coordinat. So all I actually need is end Y.
Any suggestions? Thank you.

#2 2005-08-05 05:20:57

mathsyperson
Moderator

Offline

Re: parallel line

Say your lines look like this:                      Y
                                                              /
                                                   Q       /
                                                  /        /
                                                /        /
                                              /        /
                                            /        X
                                          /
                                        /
                                       P

You know the co-ordinates of P, Q and X and the x co-ordinate of Y.
Let's say that P is (a,b); Q is (c,d); X is (e,f) and Y is (g,h). You want to find h.
You know that the two lines are parallel and that means that their gradients are the same.
The gradient of a line is the amount of units that it moves up for every unit that it moves right.
The gradient of line PQ is (d-b)/(c-a) and the gradient of line XY is (h-f)/(g-e)
As these are the same, they can be combined into an equation: (d-b)/(c-a)=(h-f)/(g-e)
As we want to find h, we want to make it the subject of this equation.
Multiply by (g-e): (d-b)(g-e)/(c-a)=h-f
Add f: h=(d-b)(g-e)/(c-a)+f

And there's your y co-ordinate!


Why did the vector cross the road?
It wanted to be normal.

#3 2005-08-05 07:02:34

ASh
Guest

Re: parallel line

Thank you very much. It was very helpful and clear. And easy, what's the most important :-)

Board footer

Powered by FluxBB