That’s an interesting way to do it! It’s pretty smart to include the index in Y. All I’m doing with this one though is wrapping the whole thing up in a neat material function. Another more advanced function incorporating the index could easily be made, though.