-- Geometric primitives for raymarching require "Vector" local V = Vector local function make_sphere(centre, radius, texture) return function(p) return {dist = V.norm(p-centre) - radius, texture = texture} end end Primitives = { make_sphere = make_sphere } return Primitives