---
title: "init(controlPoints:_:_:_:)"
framework: quartzcore
role: symbol
role_heading: Initializer
path: "quartzcore/camediatimingfunction/init(controlpoints:_:_:_:)"
---

# init(controlPoints:_:_:_:)

Returns an initialized timing function modeled as a cubic Bézier curve using the specified control points.

## Declaration

```swift
init(controlPoints c1x: Float, _ c1y: Float, _ c2x: Float, _ c2y: Float)
```

## Parameters

- `c1x`: A floating point number representing the x position of the c1 control point.
- `c1y`: A floating point number representing the y position of the c1 control point.
- `c2x`: A floating point number representing the x position of the c2 control point.
- `c2y`: A floating point number representing the y position of the c2 control point.

## Return Value

Return Value An instance of CAMediaTimingFunction with the timing function specified by the provided control points.

## Discussion

Discussion The end points of the Bézier curve are automatically set to (0.0,0.0) and (1.0,1.0). The control points defining the Bézier curve are: [(0.0,0.0), (c1x,c1y), (c2x,c2y), (1.0,1.0)].

## See Also

### Creating Timing Functions

- [init(name:)](quartzcore/camediatimingfunction/init(name:).md)
