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

# sphere(radius:in:restitution:)

Creates a sphere with the specified radius that the player tosses during gameplay.

## Declaration

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

## Parameters

- `radius`: The radius of the sphere.
- `unit`: The unit of measurement for the radius.
- `restitution`: The coefficient of restitution, in the range [0, 1].

## Discussion

Discussion 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)
- [icosahedron(height:in:restitution:)](tabletopkit/tossablerepresentation/icosahedron(height:in:restitution:).md)
- [octahedron(height:in:restitution:)](tabletopkit/tossablerepresentation/octahedron(height:in:restitution:).md)
- [tetrahedron(height:in:restitution:)](tabletopkit/tossablerepresentation/tetrahedron(height:in:restitution:).md)
