<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CAMediaTimingFunction/init(controlPoints:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CAMediaTimingFunction(im)initWithControlPoints::::"
  },
  "title" : "init(controlPoints:_:_:_:)"
}
-->

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

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

```
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

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

## 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)].

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)