Homework Help: Implicitization via Moving Curves

1. Jan 22, 2012

Zorrent12

1. The problem statement, all variables and given/known data
Hello. I am currently working with bezier curves in a programming project and have need to calculate the implicit equation of a cubic bezier curve. After doing some research, I decided to take the moving curve approach.

From what I can gather, the first step to implicitization of a cubic curve is finding a quadratic function from the following matrix.

| 3*P_0*P_1 3*P_0*P_2 P_0*P_3 | | (1 - t)^2 |
| 3*P_0*P_2 P_0*P_3 + 9*P_1*P_2 3*P_1*P_3 | | (1 - t)*t |
| P_0*P_3 3*P_1*P_3 3*P_2*P_3 | | t^2 |

Where each point is multiplied by taking the cross product of their coordinates. I chose the top function and defined the following variables

a00 = 3*(y0*1 - y1*1)
b00 = 3*(x1*1 - x0*1)
c00 = 3*(x0*y2 - x1*y0)

a01 = 3*(y0*1 - y2*1)
b01 = 3*(x2*1 - x0*1)
c01 = 3*(x0*y2 - x2*y0)

a02 = y0*1 - y3*1
b02 = x2*1 - x0*1
c02 = x0*y3 - x3*y0

representing the function as

(x*a00 + y*b00 + c00)*(1 - t)^2 +
(x*a01 + y*b01 + c01)*(1 - t)*t +
(x*a02 + y*b02 + c02)*t^2

The next step was to find a function of one degree less. I read this could be done by shifting the bottom row to the right and eliminating the bottom left corner. I defined the following additional variables

a10 = a02;
b10 = b02;
c10 = c02;

a11 = 3*(y1*1 - y3*1);
b11 = 3*(x3*1 - x1*1);
c11 = 3*(x1*y3 - x3*y1);

and representing the function as

(x*a10 + y*b10 + c10)*(1 - t) +
(x*a11 + y*b11 + c11)*t

With the two functions

(x*a10 + y*b10 + c10)*(1 - t) +
(x*a11 + y*b11 + c11)*t

and

(x*a00 + y*b00 + c00)*(1 - t)^2 +
(x*a01 + y*b01 + c01)*(1 - t)*t +
(x*a02 + y*b02 + c02)*t^2

I calculated the dot product between P(t) = (x, y, 1) and the functions. I then attempted to calculate the resultant using the Sylvester matrix, which should represent the implicit equation of the curve.

| (x*a00 + y*b00 + c00) (x*a01 + y*b01 + c01) (x*a02 + y*b02 + c02) |
| (x*a10 + y*b01 + c00) (x*a11 + y*b11 + c11) 0 |
| 0 (x*a10 + y*b01 + c00) (x*a11 + y*b11 + c11) |

(x*a00 + y*b00 + c00)*(x*a11 + y*b11 + c11)*(x*a11 + y*b11 + c11) +
(x*a01 + y*b01 + c01)*0*0 +
(x*a02 + y*b02 + c02)*(x*a10 + y*b01 + c00)*(x*a10 + y*b01 + c00) -
(x*a02 + y*b02 + c02)*(x*a11 + y*b11 + c11)*0 -
(x*a01 + y*b01 + c01)*(x*a10 + y*b01 + c00)*(x*a11 + y*b11 + c11) -
(x*a00 + y*b00 + c00)*0*(x*a10 + y*b01 + c00) = 0

The trouble is, when I plugged in the coordinates of a point on the curve, the implicit equation resulted in a number other than zero.

2. Relevant equations

Cross Product: (a, b, c) x (d, e, f) = (bf - ec, dc - af, ae - db)

Determinant of a 3x3 matrix:
a_11*a_22*a_33 +
a_12*a_23*a_31 +
a_13*a_21*a_32 -
a_13*a_22*a_31 -
a_12*a_21*a_33 -
a_11*a_23*a_32

3. The attempt at a solution

For my test, I used a curve made up of the control points

P_0 = 2, 2
P_1 = 1, 3
P_2 = 3, 4
P_3 = 5, 5

And chose to test the equation using the two endpoints. The first point resulted in the equation equaling 648.0, while the other resulted in -3240.0.

Thank you for taking the time to read my lengthy post. I apologize if the information provided is inadequate. If there is need for more clarification, please ask.

Last edited: Jan 22, 2012