2

http://research.microsoft.com/en-us/um/people/cloop/vmvbpc.pdf In this paper authors show new method for backface culling bezier patches in clip space. In section 5 using symbolic algebra software for expand equation they found that all coefficient of matrix T(u,v) is the wigth sum of cross4. They generated the table:

int idx[4][] = {{i1, j1, k1, l1},
...
{im, jm, km, lm}};
float wgt[] = {w1, ..., wm};

So I am trying to make the same thing, but I never used symbolic algebra software. All that I made after 4 hours was this (Wolfram Mathematica):

B[u_, v_] := Transpose[({
     {BernsteinBasis[3, 0, u]},
     {BernsteinBasis[3, 1, u]},
     {BernsteinBasis[3, 2, u]},
     {BernsteinBasis[3, 3, u]}
    })].({
    {b0, b1, b2, b3},
    {b4, b5, b6, b7},
    {b8, b9, b10, b11},
    {b12, b13, b14, b15}
   }).({
    {BernsteinBasis[3, 0, v]},
    {BernsteinBasis[3, 1, v]},
    {BernsteinBasis[3, 2, v]},
    {BernsteinBasis[3, 3, v]}
   })

fx[a_, b_, c_] := Det[({
    {a.y, b.y, c.y},
    {a.z, b.z, c.z},
    {a.w, b.w, c.w}
   })]

fy[a_, b_, c_] := -Det[({
     {a.x, b.x, c.x},
     {a.z, b.z, c.z},
     {a.w, b.w, c.w}
    })]


fz[a_, b_, c_] := Det[({
    {a.x, b.x, c.x},
    {a.y, b.y, c.y},
    {a.w, b.w, c.w}
   })]

fw[a_, b_, c_] := -Det[({
     {a.x, b.x, c.x},
     {a.y, b.y, c.y},
     {a.x, b.z, c.z}
    })]


cross4[a_, b_, c_] := Transpose[({
    {fx[a, b, c], fy[a, b, c], fz[a, b, c], fw[a, b, c]}
   })]

T[a_, b_] := 
 cross4[B[a, b], D[B[u, v], u] /. u -> a /. v -> b, 
  D[B[u, v], v] /. u -> a /. v -> b]

Can someone, who good with symbolic algebra, help me to generate this table?

Ilie White
  • 146
  • 4
  • 1
    Kudos for having a perfectly good but completely baffling title – ethrbunny Nov 08 '15 at 17:40
  • @ethrbunny, any suggestion for title? – Ilie White Nov 08 '15 at 17:45
  • Not a bit! Im sure it makes perfect sense to smart people. – ethrbunny Nov 08 '15 at 18:13
  • I've only glanced through the paper, but they say "These [weight] values will be the same for all bicubic Bézier patches, and we place them in a header file with format" given by the table you want to generate. So you may need to just create that table manually. – Teepeemm Nov 08 '15 at 20:49
  • @Teepeemm, I know that. I trying to make the same thing as them, but failed. I dont know, how to get this the form when t_i = ... + wgt * cross4(b_j,b_k,b_l) +... . I need someone, who can help me and show, how I can get it. – Ilie White Nov 09 '15 at 11:36

0 Answers0