I wish the syntax was more discoverable from this page. I see a sphere approximation, but no idea if it’s easy to produce from first principles or if it’s a primitive
// Given UV coordinates on the surface of a sphere u=[0,1), v=[0,1) computes the 3D location.
function spherePoint(u, v)
= vector(-cos(u*2.0*pi) * sin(v*2.0*pi), cos(v*2.0*pi), sin(u*2.0*pi) * sin(v*2.0*pi));
function sphere(segments)
= meshFromUV(spherePoint, segments);
function sphere()
= sphere(32);