---
title: "init(points:count:)"
framework: spritekit
role: symbol
role_heading: Initializer
path: "spritekit/skshapenode/init(points:count:)"
---

# init(points:count:)

Creates a shape node from a series of points.

## Declaration

```swift
convenience init(points: UnsafeMutablePointer<CGPoint>, count numPoints: Int)
```

## Parameters

- `points`: An array of Core Graphics points. The points are relative to the node’s origin.
- `numPoints`: The number of points in the array.

## Mentioned in

Creating a Shape Node from an Array of Points

## Return Value

Return Value A new shape node. The node is created with a path that starts at the first point in the array, joining each adjacent pair of points with a line segment.

## See Also

### Creating a Shape from an Array of Points

- [Creating a Shape Node from an Array of Points](spritekit/creating-a-shape-node-from-an-array-of-points.md)
- [init(splinePoints:count:)](spritekit/skshapenode/init(splinepoints:count:).md)
