Notifications
Clear all

[Closed] point from angle and length

Hi

I try find way how i can find point in Point2 space if i got angle and length. I got for example point a = [0,0] b=[1,0] and i want find where is it c [?,?]. I got also angle which is 45 degree and distance from a to c is 1 . In general i need function which count on which position is c Thanks for any help.

5 Replies

Hi thanks DenisT for your help but i already read all threads in this forum and of course that one which you linked me was first but which i have checked i really didn’t find answear to my question or i am just not so good in math . But that your first link to wiki page looks like what i am looking for. So just for sure my function will be counted from :

x’ = x cos – y sin
y’ = y cos – x cos
so once again when i have a = [0,0] b = [1,0] c = [?,?] angle between a and c is 45 degree and distance is 1 how will be look that final function with these numbers :)? Thanks

Not entirely sure what you are doing, but:

len=10 –length to new point
rot=eulerangles 0 0 45 –angle to rotate
new_vector=[len,0,0] –a vector of the required length, along the positive x-axis
new_point=new_vector*(rot as quat) –new point

Hi

Yea that’s. This is what i am looking for . It’s looks so easy now when i can see final result but i spent two days find way how i can find that point. Thanks mate.

Possibly more elegant:

len=10
the_angle=45
new_point=[cos the_angle, sin the_angle, 0]*len

no rotation, just sin/cos.