Generates the real 2D polygon of the 3D polygon. This method
		performs a change of reference system obtaining the same polygon
		but with the new z=0 plane containing the polygon.
        
        This library mostly uses the z=0 projection to perform 
        operations with the polygons. For this reason, if real 2D
        planar operations are required (like calculate real area) the 
        best way is to create a new ``pyny.Polygon`` with this method.
        
        :returns: Planar orthogonal view of the polygon.
        :rtype: ``pyny.Polygon``

def to_2d(self):
        """
        Generates the real 2D polygon of the 3D polygon. This method
		performs a change of reference system obtaining the same polygon
		but with the new z=0 plane containing the polygon.
        
        This library mostly uses the z=0 projection to perform 
        operations with the polygons. For this reason, if real 2D
        planar operations are required (like calculate real area) the 
        best way is to create a new ``pyny.Polygon`` with this method.
        
        :returns: Planar orthogonal view of the polygon.
        :rtype: ``pyny.Polygon``
        """
        # New reference system
        a = self[1]-self[0]
        a = a/np.linalg.norm(a) # arbitrary first axis
        n = np.cross(a, self[-1]-self[0])
        n = n/np.linalg.norm(n) # normal axis
        b = -np.cross(a, n) # Orthogonal to the others
        
		# Reference system change
        R_inv = np.linalg.inv(np.array([a, b, n])).T
        real = np.dot(R_inv, self.points.T).T
        real[np.isclose(real, 0)] = 0
        
        return Polygon(real[:, :2])