Quick and dirty. You probably want this for debugging, so just slap this function in wherever you want it.
Minified and full versions are included below. Pick one!
function smooth( points, steps ) | |
if #points < 3 then | |
return points | |
end | |
local steps = steps or 5 | |
local spline = {} | |
local count = #points - 1 |
function shuffle(tbl) | |
for i = #tbl, 2, -1 do | |
local j = math.random(i) | |
tbl[i], tbl[j] = tbl[j], tbl[i] | |
end | |
return tbl | |
end |