A sphere (or ball or globe) geometry.
- iOS 8.0+
- macOS 10.8+
- tvOS 8.0+
- watchOS 2.0+
A sphere defines a surface whose every point is equidistant from its center, which is placed at the origin of its local coordinate space. You define the size of the sphere in all three dimensions using its
SceneKit approximates the curved surface of a sphere using a mesh of polygons. There are two options for constructing the mesh:
By default, SceneKit constructs the sphere using a rectangular grid, like the lines of latitude and longitude on a globe of the Earth. The sphere has a vertex at each pole, and its
segmentproperty determines both the number of divisions along its surface from one pole to the other (or lines of latitude) and the number of divisions around its circumference in a horizontal plane (or lines of longitude).
If you set the sphere’s
true, SceneKit constructs the sphere by successively subdividing the triangular surfaces of a regular icosahedron. For a geodesic sphere, the
SCNSphereproperty scales logarithmically to determine the number of subdivisions, roughly approximating the number of vertices generated by a non-geodesic sphere of the same segment count.
With either approximation, increasing the
SCNSphere property produces more vertices and a more smoothly curved surface, which can improve rendering quality at a cost to rendering performance.