Math Is Fun Forum

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

You are not logged in.

#1 2008-03-01 21:47:32

exquisitenick
Guest

Find point after rotation, knowing the angle and the slope.

Hello, I have a geometric problem and I would like some help!
I have a chain of lines, one after the other with different angles and lengths.
When I want to create a new line, after the last line, I give an angle and I want to rotate the line in accordance with the previous line.
So, at the beginning I create the new line with the same slope as the the previous line and then I want to rotate it.
The problem is the calculation of the new ending point of the new line, knowing the starting point of the new line, the ending point of the new line before the rotation, and the angle of the rotation.
PS. The angle that is given for the rotation, does not refer to the Cartesian Coordinate System but to the slope of the previous line.

Thank you for your patience and your time.

#2 2008-03-02 00:48:12

JaneFairfax
Member
Registered: 2007-02-23
Posts: 6,868

Re: Find point after rotation, knowing the angle and the slope.

The matrix for rotation through angle θ anticlockwise about the origin is

If you are rotating about the point (a,b) other than the origin, first translate to the origin using

, then rotate with the matrix, then translate back with 
.

Offline

#3 2008-03-03 07:14:13

exquisitenick
Guest

Re: Find point after rotation, knowing the angle and the slope.

Hello again,
thank you for your answer, it really helped me.
But, I would like something more.
I want to create a line that is an extension of an other.
So, I want to find the ending point of the second line, knowing the slope of the first line.
How could we do this ?!

Thank you in advance for your help.

#4 2008-03-04 21:57:20

exquisitenick
Guest

Re: Find point after rotation, knowing the angle and the slope.

I found it in another forum

Let us call the x and y components in each of the ordered pairs as follows:
A = (Ax, Ay)
B = (Bx, By)
C = (Cx, Cy)

Now let us call the slope of the line m and it can be obtained from points A and B:
m = (By - Ay) / (Bx - Ax) = (Cy - By) / (Cx - Bx)

And suppose we want to extend the line by length L from point B to C, we know that:
L² = (Cx - Bx)² + (Cy - By)²

Using these two equations we can derive expressions for Cx and Cy in terms of known quantities. I won't go through the algebra here but the results are:
Cx = L / √(m² + 1) + Bx
Cy = L*m / √(m² + 1) + By

Board footer

Powered by FluxBB