# G5 - Bézier cubic spline

1.1.0 motion Cubic B-spline with XYZE destination and IJPQ offsets

### Description

`G5` creates a cubic B-spline in the XY plane with the X and Y axes only. `P` and `Q` parameters are required. `I` and `J` are required for the first `G5` command in a series. For subsequent `G5` commands, either both `I` and `J` must be specified, or neither. If `I` and `J` are unspecified, the starting direction of the cubic will automatically match the ending direction of the previous cubic (as if `I` and `J` are the negation of the previous `P` and `Q`).

See This interactive demo to understand how Bézier control points work.

### Notes

It is an error if an axis other than `X` or `Y` is specified.

### Usage

`G5 [E<pos>] [F<rate>] I<pos> J<pos> P<pos> Q<pos> [S<power>] X<pos> Y<pos> `

#### Parameters

 ` [E] ` The length of filament to feed into the extruder between the start and end point ` [F] ` The maximum feedrate of the move between the start and end point (in current units per second). This value applies to all subsequent moves. ` I ` X incremental offset from start point to first control point ` J ` Y incremental offset from start point to first control point ` P ` X incremental offset from end point to second control point ` Q ` Y incremental offset from end point to second control point ` [S] ` 2.0.8 Set the Laser power for the move. (Requires `LASER_MOVE_POWER`) ` X ` A coordinate on the X axis ` Y ` A coordinate on the Y axis

### Examples

For example, to program a curvy “N” shape:

A second curvy “N” that attaches smoothly to this one can now be made without specifying `I` and `J`: