[英]Perspective projection of rational bezier
I need a method to project 3d conics to 2d.我需要一种将 3d 圆锥投影到 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).我需要一种方法的另一件事是将 3d 或 2d 圆锥分别移动到 4d 或 3d(如反向投影)。 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.我在某处读到,有理贝塞尔曲线可以通过将它们移动到更高维度并用 de Casteljau 分割得到的非有理曲线然后向后移动来分割。 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.我不理解任何关于贝塞尔的网站上的任何文章。
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.透视变换可以将抛物线变为椭圆或双曲线,反之亦然,因此即使可以直接映射 P0、P1 和 P2,权重也会发生变化。
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,w,1) 的圆锥曲线,沿着从 (P0+P2)/2 到 P1 的直线与曲线相交的距离与权重 w 简单相关,这可以让您找到新重量如下:
If you expand out all the steps, I'm sure there are ways to simplify this procedure.如果您扩展所有步骤,我相信有一些方法可以简化此过程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.