开发者

NURBS Curve : maintain length while editing

开发者 https://www.devze.com 2023-03-17 19:34 出处:网络
I\'m trying to write an authoring tool for Maya where one of the criterion i have to satisfy is maintain length of a NURBS curve. The authoring tool provides the user the control to edit a NURBS curve

I'm trying to write an authoring tool for Maya where one of the criterion i have to satisfy is maintain length of a NURBS curve. The authoring tool provides the user the control to edit a NURBS curve , but it should be such that the length of the curve is always maintained. When i say length, i mean the arc length of the curve. Is there a direct relationship between a NURBS curve and it's arc length ?

So ideally this is how i envision my system to work , If an开发者_运维技巧y CV's of the curve is altered, the other cv's are altered such that the arc length of the curve is preserved. Any ideas to implement this would be extremely helpful.

Also, How do you think maya computes arcLength ? I'm using a curveInfo node to compute arcLength of a curve. Does it just sum up the peicewise polynomial line segments that make up the curve for it's length ?


From a mathematical point of view the exact length of a NURBS curve is an "ugly monster". Indeed even the length of a Bezier curve is already a monster (the length of a generic Bezier cubic is an elliptic integral).

But even assuming approximate length (that is a much simpler problem) is enough for you, I think that the idea of moving all other vertexes so that the length remain the same for a given parametric interval is both quite complex numerically and questionable (for sure the solution is not unique, so what metric should be used to choose the "best" adjustment for other vertexes so that the solution becomes unique?).

Wouldn't be enough for you instead to just have the user move a single vertex or changing a single weight and then showing the point along the curve that is at a specific arc length? That is well defined, easy for the user to anticipate (no "surprises" about other vertexes that the user would like to stay fixed) and a lot easier to implement.


This feature is built into Maya since forever. Just draw a curve then while the curve is selected choose Edit Curves -> Modify Curves -> Lock Length.

0

精彩评论

暂无评论...
验证码 换一张
取 消