1 -- Geometric primitives for raymarching
5 local function make_sphere(centre, radius, texture)
8 return {dist = V.norm(p-centre) - radius,
13 local function make_plane(centre, normal, texture)
15 return {dist = normal*(p-centre),
20 local function make_pipe(centre, radius, axis, texture)
22 return {dist = V.norm(V.cross(p-centre, axis)) - radius,
29 make_sphere = make_sphere,
30 make_plane = make_plane,