<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNPyramid/init(width:height:length:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNPyramid(cm)pyramidWithWidth:height:length:"
  },
  "title" : "init(width:height:length:)"
}
-->

# init(width:height:length:)

Creates a pyramid geometry with the specified width, height, and length.

```
convenience init(width: CGFloat, height: CGFloat, length: CGFloat)
```

## Parameters

`width`

The width of the pyramid along the x-axis of its local coordinate space.

`height`

The height of the pyramid along the y-axis of its local coordinate space.

`length`

The length of the pyramid along the z-axis of its local coordinate space.

## Return Value

A new pyramid geometry.

## Discussion

The pyramid’s base is centered in its local coordinate system. For example, if you create a pyramid whose width, height and length are all `10.0`, its apex is at the point `{0, 10.0, 0}`, and its base lies in the plane whose y-coordinate is `0.0`, extending from `-5.0` to `5.0` along both the x- and z-axes.

---

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)