---
title: "icosahedron(height:in:restitution:)"
framework: tabletopkit
role: symbol
role_heading: Type Method
path: "tabletopkit/tossablerepresentation/icosahedron(height:in:restitution:)"
---

# icosahedron(height:in:restitution:)

Creates a regular icosahedron, a shape with 20 triangular faces, that the player tosses during gameplay.

## Declaration

```swift
static func icosahedron(height: Float, in unit: UnitLength = .meters, restitution: Float? = nil) -> TossableRepresentation
```

## Parameters

- `height`: The height of the icosahedron from face to opposite face.
- `unit`: The unit of measurement for the height.
- `restitution`: The coefficient of restitution, in the range [0, 1].

## Discussion

Discussion The vertices for the simulated icosahedron with given face to opposite face height (h) are derived from the points on the circumscribed sphere with radius (r) with the following coordinates: phi = (sqrt(5) + 1) / 2, r = h/2 ⋅ sqrt(phi^2 + 1)⋅sqrt(3)/phi^2: ±Y face: ±{       0, +1,       -2/phi^2 } ⋅ h/2, ±{+1/phi^2, +1, +sqrt(3)/phi^2 } ⋅ h/2, ±{+1/phi^2, +1, -sqrt(3)/phi^2 } ⋅ h/2 Equator: ±{      0, +1/phi^3,        2/phi } ⋅ h/2, ±{ -1/phi, +1/phi^3, +sqrt(3)/phi } ⋅ h/2, ±{ -1/phi, +1/phi^3, -sqrt(3)/phi } ⋅ h/2 Higher restitution values indicate materials that conserve kinetic energy during collisions, causing objects to bounce off each other elastically. Lower values suggest materials that absorb kinetic energy, resulting in less bounce and more energy loss upon impact.

## See Also

### Creating geometric shapes

- [cube(height:in:restitution:)](tabletopkit/tossablerepresentation/cube(height:in:restitution:).md)
- [decahedron(height:in:restitution:)](tabletopkit/tossablerepresentation/decahedron(height:in:restitution:).md)
- [dodecahedron(height:in:restitution:)](tabletopkit/tossablerepresentation/dodecahedron(height:in:restitution:).md)
- [octahedron(height:in:restitution:)](tabletopkit/tossablerepresentation/octahedron(height:in:restitution:).md)
- [sphere(radius:in:restitution:)](tabletopkit/tossablerepresentation/sphere(radius:in:restitution:).md)
- [tetrahedron(height:in:restitution:)](tabletopkit/tossablerepresentation/tetrahedron(height:in:restitution:).md)
