<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSBezierPath/curve(to:controlPoint1:controlPoint2:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSBezierPath(im)curveToPoint:controlPoint1:controlPoint2:"
  },
  "title" : "curve(to:controlPoint1:controlPoint2:)"
}
-->

# curve(to:controlPoint1:controlPoint2:)

Adds a Bezier cubic curve to the path.

```
func curve(to endPoint: NSPoint, controlPoint1: NSPoint, controlPoint2: NSPoint)
```

## Parameters

`endPoint`

The destination point of the curve segment, specified in the current coordinate system

`controlPoint1`

The point that determines the shape of the curve near the current point.

`controlPoint2`

The point that determines the shape of the curve near the destination point.

## Discussion

You must set the path’s current point (using the [`move(to:)`](/documentation/AppKit/NSBezierPath/move(to:)) method or through the creation of a preceding line or curve segment) before you invoke this method. If the path is empty, this method raises an <doc://com.apple.documentation/documentation/Foundation/NSExceptionName/genericException> exception.

---

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)