开发者

Specifying the Tension in a Cubic Bezier Curve

I am attempting to create a PathGeometry that approximates a series of orthogonal line segments using cubic bezier curves in Wpf. I came across an article on msdn that describes Cardinal Splines in GDI+, which is almost exactly what I wish to accomplish.

I have, for the most part succeeded, but I now need to implement a 开发者_运维技巧property which controls the "smoothness" of the curve, like the tension property described in the above article. The article states that a value of 1.0 for the tension results in a "path of least total bend".

What does this mean for the control points of the cubic bezier curve? Where would they be placed relative to the endpoints in order to achieve this effect?

Note: Since the line segments are orthogonal, the angle between two consecutive segments is always 90 degrees. I'm not sure if that simplifies anything.

Here is an image from the article for easy reference. The red squares indicate end points and the numbers indicate the tension, though I am most interested in values from 0.0 to 1.0 inclusive.

Specifying the Tension in a Cubic Bezier Curve

(source: microsoft.com)


Look at this reference for normal tension. link: Asymptote Documentation - Beziers

Apperently the line connecting the midpoints of the control lines has to be tangent to the curve.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜