Home > Blockchain >  Perspective projection of rational bezier
Perspective projection of rational bezier

Time:06-12

I need a method to project 3d conics to 2d. None of the articles tell how to do this with rational beziers. Another thing I need a method for is moving 3d or 2d conics to 4d or 3d respectively (as in a reverse projection). I read somewhere that rational beziers can be split by moving them to a higher dimension and splitting the resulting non-rational curve with de Casteljau and then moving back. I seem to recall that perspective projection of conic beziers can be represented exactly with conic beziers, and that it may involve splitting into several curves. I don't understand any of the articles on any site on beziers.

CodePudding user response:

Since there aren't any better answers, here's what I can offer off the top of my head...

Perspective transformation can change parabolas into ellipses or hyperbolas and vice-versa, so even though P0, P1, and P2 can be directly mapped, the weights will change.

Assuming a conic with weights (1,w,1), however, the distance along the line from (P0 P2)/2 to P1 at which it intersects the curve is simply related to the weight w, and that lets you find the new weight as follows:

  1. Map P0, P1, and P2 to P0', P1', P2'
  2. Calculate the midpoint M' = (P1' P2')/2
  3. Inverse map M' to M, and calculate the intersection point I of the line M-P1 with the original curve.
  4. Map the intersection point I to I', to get the point at which the new curve should intersect M'-P1'
  5. Calculate the new weight w' from the position of the intersection I'.

If you expand out all the steps, I'm sure there are ways to simplify this procedure.

  • Related