I'm building a 360 degree image rotator, and I have the need to load in images in a specific order. Reason being, there can be a lot of images, and we need to load in as many images from the most angles while providing a view of as much of the object as possible, without the rotation being too jerky.
if we have 360 images that capture the object at a 1 degree angle difference, how would I take an array of images thats in order from 1-360 and rearrange it, to load in the image at index 180, then 90 degrees, then 45 degrees, and so on.
Images array:
var images = [image_001.jpg, image_002.jpg, ...image_475.jpg];
For example, I need to find out the next array index in the sequence. I need to load indexes in this order: 1, 180, 360, 90, 135, 225, 315, 45, etc...
If someone knows of a name for an algorithm this represents, that would be helpful, as well as examples.
Thanks for reading.