end
end
+local function make_pipe(centre, radius, axis, texture)
+ return function(p)
+ return {dist = V.norm(V.cross(p-centre, axis)) - radius,
+ texture = texture}
+ end
+end
+
+
Primitives = {
make_sphere = make_sphere,
- make_plane = make_plane
+ make_plane = make_plane,
+ make_pipe = make_pipe
}
return Primitives