Rotate normal vector onto axis plane

前端 未结 3 1720

I have a set of data points in 3D space which apparently all fall onto a specific plane. I use PCA to compute the plane parameters. The 3rd component of PCA gives me the normal

3条回答
  •  醉梦人生
    2021-02-05 22:26

    How about:

    Decompose the normal vector into a vector in the XY-plane and a Z vector. Then apply a rotation around the Z-axis to line up the XY vector with one of the axis. Then find the dot product of the the normal with the Z-axis, and rotate along which ever of X,Y you lined up with.

    The idea is to line the normal vector up with Z, and by doing that your plane is now the XY plane.

提交回复
热议问题