---
title: "init(startPoint:segments:)"
framework: phase
role: symbol
role_heading: Initializer
path: "phase/phaseenvelope/init(startpoint:segments:)"
---

# init(startPoint:segments:)

Creates an envelope with a start point and segments.

## Declaration

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

## Parameters

- `startPoint`: The start point of the envelope.
- `segments`: An array of segments.

## Discussion

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