#How find rotation btween two points XY and XY
58 messages · Page 1 of 1 (latest)
f0xy
No
A triangle has three sides a, b and c. As does your picture.
Assuming that the angle to left is 90 degress, we can apply the Pythagorean theorem.
Once you established that you would have to use sin or cos
ok
Wait
there's an even simpler solution
Do you know how to work with tan($\alpha$)?
f0xy
tan($\alpha$) is an mathematical operation
f0xy
and $\alpha$ is an angle
f0xy
your rotation
so you need the point?
or do you want the angle
?
So tan($\alpha$) = $\frac {opposite} {adjacent}$ inside a triangle with one angle being 90 degrees
f0xy
If we take your example from earlier with one side being the length of 3 and the other one 4. This would look like tan($\alpha$) = $\frac {4} {3}$.
f0xy
f0xy
now you would have to to the following
f0xy
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
$$\alpha =tan^{-1}(\frac{4}{3})$$
yes
animeonfire
yes
that would calculate your angle
assuming that your sides are the length 3 and 4 as above.
What is the actual problem? Like, you have that example, but what is the question?
For this one there is an even easier solution
really?
Cause when you take the x and y difference between the points you find that both legs of the triangle are equal to 1
Since the angle in the bottom left corner is (most likely) a 90° angle, we have that (since the other two angles need to be of equal size) that the other angles are both equal to 45°
Given that the sum of inner angles in any triangle is always 180°
Yep
Lemme quickly look up the english term for that
That kind of triangle is an isosceles triangle, if you ever wanna learn more about it
Btw, are you german?
But the equation is flawed, even if it means the right thing:
Take the total sum (180°).
Subtract 90°, as this is the right angle.
Then you have 90° left.
Since the other angles (by construction of an isosceles triangle) are always equal, they both must be equal to X°.
Therefore, 90°=2×X°
And finally X°=45°
you dont
yes. wby?
