<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PHASE",
  "identifier" : "/documentation/PHASE/PHASEEnvelope/init(startPoint:segments:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "PHASE"
    ],
    "preciseIdentifier" : "c:objc(cs)PHASEEnvelope(im)initWithStartPoint:segments:"
  },
  "title" : "init(startPoint:segments:)"
}
-->

# init(startPoint:segments:)

Creates an envelope with a start point and segments.

```
init?(startPoint: simd_double2, segments: [PHASEEnvelopeSegment])
```

## Parameters

`startPoint`

The start point of the envelope.

`segments`

An array of segments.

## Discussion

For an empty `segments` argument, the resulting envelope contains one segment where the end point matches the start point. If the `segments` argument contains more than one segment, the resulting [`segments`](/documentation/PHASE/PHASEEnvelope/segments) array sorts in ascending order on the *x* value.

> Important:
> The start point’s *x* value must be less than or equal to the segment with the lowest *x* value of all other `segments`, otherwise this function returns `nil`.

---

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)