Thank you for this. Useful in my work for voxel array sampling for further use with Floyd-Warshall algorithm. Large voxel arrays take obscene quantities of time with Floyd-Warshall, so periodic sampling is useful.
Thank you also for packaging the two required files.
Extremely rapid short-circuiting "any" checking. I am using this to compare large logical 3D arrays, and despite your own comments in the file documentation, it is actually even faster than the built-in any on my data. It is unfortunate this doesn't support logical inputs, because then I have to use find on my logical arrays first, and I could probably see some small speed improvement comparing logical arrays directly.
And yes, it is still faster than the built-in any even with two find calls on equally sized arrays. According to the profiler, its about twice as fast.
Absolutely wonderful code. Very useful for visualizing voxel representations of part models for analysis of casting properties.
I made a slight change to the code on my own machine that has made some models a bit prettier. Specifically, at lines 204, 222, and 239, (drawing individual surface patches for x,y,z slices), I added a second line that adds 1 to the relevant dimension to draw the back surface of each voxel as well. While this obviously doubles the quantity of objects that need to be rendered, it makes very thin voxel sections (1 voxel thickness) more aesthetically appealing.
Perhaps an option to draw back surface patches? Just a suggestion.
Thank you for this code, I wouldn't be moving nearly as fast on my own work without it.