def test_implicitize(self): nodes = np.eye(3, order="F") triangle = self._make_one(nodes, 1, copy=False) f_polynomial = triangle.implicitize() x_sym, y_sym, z_sym = sympy.symbols("x, y, z") expected = 1 - (x_sym + y_sym + z_sym) self.assertTrue(test__symbolic.sympy_equal(f_polynomial, expected))
def test_implicitize(self): nodes = np.asfortranarray([[3, 3, 4, 6], [3, 3, 3, 0]]) curve = self._make_one(nodes, 3, copy=False) f_polynomial = curve.implicitize() x_sym, y_sym = sympy.symbols("x, y") expected = -9 * (x_sym**3 - 9 * x_sym**2 + 27 * x_sym - 3 * y_sym**2 + 18 * y_sym - 54) self.assertTrue(test__symbolic.sympy_equal(f_polynomial, expected))