Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

mesh.sphere

A sphere centred on the origin: 32 segments round and 32 rings from pole to pole, with smooth normals and longitude and latitude as texture coordinates. Use it for balls, planets and domes.

The triangles that close to a point at each pole are dropped.

Inputs

  • radius (Float, default 0.5, at least 0). The sphere's radius, in metres.

Outputs

  • geometry (Geometry). Triangles with P, N and uv on their points; primitives carry vstart and vcount.
local ball = g.mesh.sphere({ radius = 0.25 })