Math Node: How to make an interval/range of numbers for Selection

Hello, my knowledge of math is not superb so I’m suspicious I’m missing on some function, that is already a default in the Math node. What I want to do is to create a selection by an interval of numbers, which can incrementally grow both ways (sure, once it will hit 0 on one side, I will have to add a condition and adjust it to grow from the other end of the circle in the screenshot).

In the example, Snap is just a random placeholder to illustrate what the basic set-up is.

The goal is to make geometry grow from various index numbers as a starting point.

If you want to get a range of numbers between A and B, you need a logical AND node setup. This is a Math Greater Than and a Math Less Than, with both outputs going into a Math Minimum. This will return 1 for any numbers in range and 0 for numbers outside range l, which you can use as a switch

1 Like

Hey there!

This didn’t make it work, but it gave me the needed idea. I was trying to do it with the Greater / Less comparisons earlier, plugging them into a Math Add, which didn’t work. But Using Compare instead solved it finally.

Thank you!

It will need more nodes to work properly once the steps cross the start or end point, but that should be easy (unless I just cursed myself here by saying this haha).

1 Like

Ah, I think you might have meant Boolean Math AND operator, which can join the Greater Than and Less Than smoothly. Plan B!

1 Like

I didn’t initially mean that, but now that you mention it, yep, that’s exactly what you’re looking for :sweat_smile:

1 Like