Nearest Neighbours using Quaternions
问题 Given a quaternion value, I would like to find its nearest neighbour in a set of quaternions. To do this, I clearly need a way to compare the "distance" between two quaternions. What distance representation is needed for such a comparison and how is it computed? Thanks, Josh 回答1: Is your quaternion just a point in 3D space with an orientation? Then the distance between two quaternions x1,y1,z1,w1 and x2,y2,x2,w2 is given by: distance = sqrt((x1-x2)^2 + (y1-y2)^2 + (z1-z2)^2) , assuming that