Basic definitions (from your book of trigonometry):
cos ϴ = x/h, sin ϴ = y/h
ASCII royalty-free art to describe x, y, and H:
_
/\ assume we're going this way
/
/|
/ |
h / |
/ | Y
/ |
/ϴ |
+-------
X
A vector can be divided into the sum of two vectors. (you can think about it in the diagram, since the transition to the northeast for H meters is the same as east for X meters and north for Y meters)
H in this case matches your current thrust. You want to find components X and Y of this target.
since cos Θ = X / H (the basic definition of cosine), we can say (through simple algebra)
X = H * cos ϴ
, Θ . , Math.PI/180, . ,
ϴ = angle * Math.PI / 180
! ( )
cos (angle * Math.PI / 180) = X / H
H - , X - .
" ", - . " ? ". . - --------> . , " ", .. 0 12:00. , , X Y . , - X Y .
standard 'math' coordinate system
_
/\
/
/|
/ | angles increase counterclockwise
h / |
/ | Y
/ |
/ϴ |
+----------- (zero degrees starts here)
(0,0) X
your coordinate system
(zero degrees starts here)
^
| angles increase clockwise
| /
| /
|ϴ/
|/
+
, ? ,
^ y-axis
|
|
+----> x-axis
, (, )
+------> x-axis
|
|
v y-axis
y , y 1,