G
G
glebasya20002015-12-18 22:20:50
Game development
glebasya2000, 2015-12-18 22:20:50

How to move a point by specified distance and angle?

It is necessary to move a point on a plane by some distance at a specified angle. Point A (1; 1) at an angle of 45 goes to point B, the distance between A and B is 1 . What is the formula for finding B?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vitaly Stolyarov, 2015-12-18
@Ni55aN

That's
where x1,y1 - coordinates of point A
a - angle in degrees
d - distance
where B = (x1+d cos a, y1+d sin a)

T
tsarevfs, 2015-12-18
@tsarevfs

Distance and angle (r, fi) define the displacement vector. Find its coordinates t =(xt, yt) in Cartesian s. k. according to the conversion formula from polar coordinates. And then B = A + t;

X
xmoonlight, 2015-12-19
@xmoonlight

www.tvd-home.ru/prog/13_7

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question