Graph IDE ► Basic Graphics ► Cubic Bezier

A Cubic Bezier graphic is a connected sequence of Cubic Bezier sections. Another way to put that is that given any two consecutive points in a sequence there is a curve that connects those two points and that curve is defined by a third-order parametric equation. To define the coefficients of that equation two artificial control points have to be introduced. Those points are predefined as the ends of tangent lines from the end points of the curve segment in question. In fact any control points can be used, but ones that define tangent lines are not only conventional but they also make sense. So, with that in mind and now that I told you what the definition of a Cubic Bezier graphic is I will now change the definition slightly to this:

A Cubic Bezier graphic is a connected sequence of points where each point in that sequence has two tangent lines drawn from it on either side to define the slope of a curve intersecting that point. One definition is segment-oriented the other point-oriented. The point-oriented definition is easier to deal with in many ways.

The figures below show examples of Cubic Bezier graphics.

Some standard operations are itemized below.

- To create a Cubic Bezier bring forward the Graphic Selector, click the Cubic Bezier factory cell and then mouse down on a Graphic View and drag the cursor to another point. The initial and final cursor locations define the boundary of a predefined Cubic Bezier graphic.
- You can also create Cubic Bezier graphics from the standard Palettes ► Art ► or Palettes ► Maps ► menu items or drag them out from the Cubic Bezier Factory Inspector.
- Resizing and rotating the Cubic Bezier transforms all points simultaneously. For more information see Standard Editing.
- One thing you will probably want to do with a Cubic Bezier is modify its points. You can do that via the Data or parser Inspector Editor or by editing it directly with the mouse controls. Initially, the spline knots (tangent end points) are under the vertex points so you will not be able to get at them by clicking on them. You should first smooth out the graphic so that the control knots move away from the vertex points and then enter the mouse edit mode and move those knots as you wish. See Standard Editing for information on point editing.
- To program a Cubic Bezier see the Programming section.

Data Editor

The Data Editor for the Cubic Bezier is shown below.

Table

Table controls are described in the Tables section.

The rows represent knot and vertex values at a particular vertex. While in Atomic mode, the cell represents a point (x and y value) and while in component mode the cell represents either a x or y value. Hence, in atomic mode there are 3 columns while in component mode there are six columns.

Notice that the table is point wise and not parametric-section wise. The first and last knots are non-functioning since they would be associated with a section outside the parametric-sections, however they are included in the dataset to make it uniform.

The units of the data values are in the unit of the coordinate system. For a Graphic View those units are always typographical points (and not the report units) while for Graphs the units are either user assigned or unitless.

Graphics Editor

The Graphics Editor for the Cubic Bezier is shown below.

Common Controls

Other controls common to all graphics are described in the Graphics section.

Cubic Bezier Specific Controls

Smoothness : Adjust the spline knots of the Cubic Bezier so that the tangent lines at a vertex are more coincidental. Zero moves the knot locations under the vertex location while one is maximum smoothness. Choosing a smoothness greater than zero is a good way to expose the knots for point editing.

Point Editing

Editing Off/On : Places the graphic into or out of edit mode. While in edit mode the vertices and knots are shown by indicators and can be adjusted using mouse or touch events. Double-clicking the graphic also toggles this edit mode.

Select/Move or Add/Delete : Select/Move mode permits the knot and vertex editing to select and move those locations while Add/Delete mode will delete a knot or vertex if they are hit or add a knot and vertex (triplet) if a cubic bezier segment is hit. This can also be accomplished using the shift key if available.