<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLMesh/newIcosahedron(withRadius:inwardNormals:allocator:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Model I/O",
      "ModelIO"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLMesh(cm)newIcosahedronWithRadius:inwardNormals:allocator:"
  },
  "title" : "newIcosahedron(withRadius:inwardNormals:allocator:)"
}
-->

# newIcosahedron(withRadius:inwardNormals:allocator:)

Generates a mesh in the shape of a regular 20-sided polyhedron with triangular faces.

```
class func newIcosahedron(withRadius radius: Float, inwardNormals: Bool, allocator: (any MDLMeshBufferAllocator)?) -> Self
```

## Parameters

`radius`

The distance from the icosahedron’s center to any one of its vertices.

`inwardNormals`

<doc://com.apple.documentation/documentation/Swift/true> to generate normal vectors pointing toward the center of the icosahedron; <doc://com.apple.documentation/documentation/Swift/false> to generate normal vectors pointing outward.

`allocator`

An object responsible for allocating mesh vertex data. If `nil`, Model I/O  uses an internal allocator object.

## Return Value

A new mesh object.

## Discussion

This method generates vertex data for an icosahedron centered at the origin of its local coordinate system. An icosahedron is a rough approximation of a sphere—to generate a more precise approximation, create an icosahedron and use the [`newSubdividedMesh(_:submeshIndex:subdivisionLevels:)`](/documentation/ModelIO/MDLMesh/newSubdividedMesh(_:submeshIndex:subdivisionLevels:)) method to turn it into a geodesic sphere.

The `inwardNormals` parameter determines the direction of generated vertex normal vectors for the mesh. Specify <doc://com.apple.documentation/documentation/Swift/true> if the mesh will be viewed from inside (for example, for use in a sky effect), or <doc://com.apple.documentation/documentation/Swift/false> if the mesh will be viewed from outside.

---

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)