TOPICS
Search

Planar Polygon


Flat polygons embedded in three-space can be transformed into a congruent planar polygon as follows. First, translate the starting vertex to (0, 0, 0) by subtracting it from each vertex of the polygon. Then find the normal n to the polygon by taking the cross product of the first and last vertices. Now, let A be the rotation matrix for Euler angles psi, theta, and phi, and solve

 A[n_x; n_y; sqrt(1-n_x^2-n_y^2)]=[0; 0; 1]
(1)

for cospsi and costheta (after first expressing sines in terms of cosines using cosx=sqrt(1-sin^2x). The result is

cospsi=+/-(n_y)/(sqrt(n_x^2+n_y^2))
(2)
costheta=+/-sqrt(1-n_x^2-n_y^2).
(3)

The signs are chosen as follows:

psi=cos^(-1)[-sgn(n_x)(n_y)/(sqrt(n_x^2+n_y^2))]
(4)
theta=cos^(-1)[-sgn(n_xn_z)sqrt(1-n_x^2-n_y^2)].
(5)

Plugging these back in and applying to the original polygon then gives a polygon whose vertices all have one component zero. This component can then be dropped. The only special cases which need to be taken into account are |n_z|=1, in which case the polygon is parallel to the xy-plane and the third components can be immediately dropped. The second occurs when n_x=0, in which case there is no component of the normal vector along the x-axis, so the Euler rotation will not work. However, simply picking a different starting vertex from which to calculate the normal resolves this degenerate case.


See also

Polygon

Explore with Wolfram|Alpha

Cite this as:

Weisstein, Eric W. "Planar Polygon." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/PlanarPolygon.html

Subject classifications