What is a Cardinal Spline?
2010-05-19 09:52
183 查看
This oddly named thing is simply a line with tension. A set of X,Y coordinates can be used to make a polygon or poly-line. Usually the points are connected by straight-line segments. A Cardinal Spline takes the positions of the current point and,along with the previous and next points, averages out the positions using a tension value. This smoothes the line and makes a path that is gently curved through the points rather than zigzagging through them. Figure 1 shows a cardinal spline drawn through several points. The black dots are the nodes, the lines are the curves generated by several different representations of the line at different tensions.
The red line has zero tension. The Indigo line has a tension of 1. The others are something in-between.
Cardinal splines are just a subset of the hermite curves. They don't need the tangent points because they will be calculated from the control points. We'll lose some of the flexibility of the hermite curves, but as a tradeoff the curves will be much easier to use. The formula for the tangents for cardinal splines is:
Ti = tension * ( Pi+1 - Pi-1 )
tension is a constant which affects the tightness of the curve. Write yourself a program and play around with it. ( tension should be between 0 and 1, but this is not a must).
The red line has zero tension. The Indigo line has a tension of 1. The others are something in-between.
Cardinal splines are just a subset of the hermite curves. They don't need the tangent points because they will be calculated from the control points. We'll lose some of the flexibility of the hermite curves, but as a tradeoff the curves will be much easier to use. The formula for the tangents for cardinal splines is:
Ti = tension * ( Pi+1 - Pi-1 )
tension is a constant which affects the tightness of the curve. Write yourself a program and play around with it. ( tension should be between 0 and 1, but this is not a must).
相关文章推荐
- What is a Cardinal Spline?
- 解决 "cc.CardinalSplineTo:create() method is nil" 的问题
- What is the best way to paginate results in SQL Server
- what is worth doing is worth doing well
- HDU 2133 What day is it
- A. What is for dinner?
- What are the best ways to determine what port an application is using?
- HDU 1084 What Is Your Grade?
- What Silverlight is and how it differs from WPF
- Maven... What is it?
- cocos2d-x实例学习(9)之CCCardinalSplineBy
- 什么是六顶思考帽子? / What is Six Think Hat in Strategic Analysis?
- What is the NETStandard.Library metapackage?
- What Is a Tank Circuit?
- What is virtual memory, how is it implemented, and why do operating systems use it?
- What is the difference between a processor, a chip, a socket, and a core?
- What is template design pattern?
- What is the Indexing Service?
- J - What day is that day? ----最小循环节
- what is HTTP OPTIONS verb