I just don’t know enough math to understand what this is called, specifically so I can recognize the correct formula. I can build the external (or perhaps there’s one or two objects that do the same), no problem. I’m just stuck on the math.

Thanks, would really appreciate any help.

]]>– Pasted Max Patch, click to expand. –

edit: btw if there's an easier way to do this I'd like to know…

]]>Thanks for the suggestion! It’s quite the contraption! :)

]]>Here is a js version:

```
seq = function (start, n) {
if (start >= n)
return [];
var i, res = [];
for (i = start + 1; i < = n; i++) {
res.push(start);
res.push(i);
}
return res.concat(seq(start + 1, n));
}
```

]]>
I think they’re called combinations as (distinct from permutations)

and that’s as far as my maths knowledge allows me to go

and as Hans has eloquently illustrated, much easier to do in a text-based language rather than in max

]]>You know, I really need to read up on this more. I’m doing 2D collision detection between objects, with 52 possible objects on screen at any point. I was using a “good enough” approach for up to 8 possible collisions but trying to go higher is just proving a headache.

Perhaps I need to find a more efficient approach to this and code it in an external.

]]>