MHB Calculate third point from 2 points and an angle

GamerVSL
Messages
2
Reaction score
0
I'm having a hard time putting together a formula. I have 2 points (x0, y0) and (x1, y1) and an angle (k).
Using this information I need to calculate a third point that is k degrees from the previous 2 points.
View attachment 7880
Is it possible to do that? Thank you for your attention.
 

Attachments

  • problema_code.jpg
    problema_code.jpg
    32 KB · Views: 112
Mathematics news on Phys.org
From your diagram, it looks as though the point C is found by rotating (x1,y1) about (x0,y0) by an angle of x degrees. Is this what you want? If so, there are standard ways of doing this problem. If you need further help on this, post again.
 
I found a method:

Cx=cos(θ)⋅(X1−X0)−sin(θ)⋅(Y1−Y0)+X0
Cy=sin(θ)⋅(X1−X0)+cos(θ)⋅(Y1−Y0)+Y1

Is it right?
 
Yes, this rotates (x1,y1) about (x0,y0) through an angle of $\theta$.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
6
Views
1K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K