Here’s the Javascript version: http://colin.scienceninja.com/math/slices.html <http://colin.scienceninja.com/math/slices.html> It takes between 5 and 15 milliseconds to run on my iPad.