Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 Re: Help Me ! » Getting a line intersect points A and B. » 2014-06-04 14:55:27

No need for an answer, I have the formula. Thanks.

#2 Help Me ! » Getting a line intersect points A and B. » 2014-06-04 14:07:37

LolTrains
Replies: 3

Hi, and thanks for helping!

Education level: In highschool.

I enjoy programming, and thats what I am doing right now, so things may be a bit different in my question.

The problem:
Note: This is all in X and Y axis.
I have point A(100,100), and point B(200,200). Using the distance formula, the distance between them is 141.42135623731. The midpoint for X and Y is both 150.
This is where its different because I program; I am making a user interface, and have a line. The lines length is the distance (aprox 141). I need a formula that will rotate the line in such a way that it will intersect both A and B (A and B will move, and not always be at 100,100 and 200,200). For the user interface the center of the line is the midpoint, so it just needs to be rotated at the right angle.

I cant make a formula for the problem above, so Im hoping that someone will help me! Thanks! big_smile

--Michael

Board footer

Powered by FluxBB