A Bezier curve is a parametric curve frequently used in computer graphics and related fields. In vector graphics, Bezier curves are used to model smooth curves that can be scaled indefinitely. There are many ways to construct a Bezier curve. This simple program uses the midpoint algorithm of constructing a Bezier curve. To show the nature of the divide and conquer approach in the algorithm, a recursive function has been used to implement the construction of the piece of Bezier curve.
BezierCurve
00 Remarks
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| ReCalculate | 1 | recreate the bezier curve. |
| CreateBezier | 1 | create a bezier curve |
| PopulateBezierPoints | 1 | Recursivly call to construct the bezier curve with control points |
| MidPoint | 1 | Find mid point |
| MidPoints | 1 | medial axes between node centres And also boundary lines for the grid |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| BezierPoints | 1 | store the list of points in the bezier curve.(贝塞尔曲线插值的结果列表) |
| InitPointsList | 1 | store the list of initial points |
| Iterations | 1 | store the number of iterations |
04 Members
PointF, PointF, PointF, Int32)recreate the bezier curve.
| Name | Type | Description |
|---|---|---|
ctrl1 | PointF | first initial point |
ctrl2 | PointF | second initial point |
ctrl3 | PointF | third initial point |
iteration | Int32 | number of iteration of the algorithm |
the list of points in the curve
PointF, PointF, PointF)create a bezier curve
| Name | Type | Description |
|---|---|---|
ctrl1 | PointF | first initial point |
ctrl2 | PointF | second initial point |
ctrl3 | PointF | third initial point |
PointF, PointF, PointF, Int32)Recursivly call to construct the bezier curve with control points
| Name | Type | Description |
|---|---|---|
ctrl1 | PointF | first control point of bezier curve segment |
ctrl2 | PointF | second control point of bezier curve segment |
ctrl3 | PointF | third control point of bezier curve segment |
currentIteration | Int32 | the current interation of a branch |
PointF, PointF)Find mid point
| Name | Type | Description |
|---|---|---|
control1 | PointF | first control point |
control2 | PointF | second control point |
Double())medial axes between node centres And also boundary lines for the grid
| Name | Type | Description |
|---|---|---|
a | Double() | - |
store the list of points in the bezier curve.(贝塞尔曲线插值的结果列表)
store the list of initial points
store the number of iterations