Find point on a trajectory nearest a point

3 views (last 30 days)
Adam Levschuk on 17 Jun 2020
Commented: KSSV on 18 Jun 2020
Hello all,
I am trying to the point on a trajectory nearest a point. I have a trajectory called 'trajAP" (it is a a trejectory of euler angles paired with angular velcoity). For each point on trajAP there is a point p1 a certain distance away.
I am trying to find the point on trajAP that is the nearest to point, p1.
Ive tried our a handful of methods but nothing has worked. Any suggestions?

Show 1 older comment
Adam Levschuk on 17 Jun 2020
Hi James, trajAP is a set of points, a 2x12000 array. The top row is the position (angle), the bottom row is angular velcoity.
P1 is a set of points that is a defined distance away from each point in trajAP. for each point in trajAP, there is a point p1 that is 0.01 rad away.
For each p1, i am tryiung to find the nearest point on trajAP.
Matt J on 17 Jun 2020
Well, you need to re-represent the trajectory (and p1) as a series of (x,y) position coordinates first. it doesn't seem to me that you have enough information in trajAP to do so.
KSSV on 18 Jun 2020
What p1 has? p1 also the same angle and angular velocity? If so have a look on knnsearch. IF not tell more about p1 or share data.