# Problem with limit chop

Hi,
I’m having a strange problem with limit chop.

I did a scroller which moves points along y-axis and when they reach certain value, they jump back to start. It works as intended when I use only one set of points (grid sop to chop), but when I added another, symmetrical set of points, limit chop wraps around in a strange way and it results in some duplicate points.

As you can see, in the limit chop in the upper row the steps are regular but in the lower chop there is one step that is twice as long as others, which results in duplicate instances.

I cant figure out what creates it and how I can get rid of it, can anyone help?

.tox attached.
limit_problem.tox (1.3 KB)

Hey @Nackgi - this problem actually presents in your first example as well, it’s just at the beginning and the end of your channel range:

I’d guess the math here is that a value equal to 50 meets the test for remapping, and is then immediately changed to the minimum bound by the limit CHOP. Esentially meaning that no sample can actually ever be your max value, only approach it - so it can be 49.9999, but as soon as it becomes 50, it’ll be cycled to the minimum value in the limit (-50 in your case).

When you duplicate the grid, the problem just becomes more apparent - though it’s really the same thing that’s happening above:

Said another way - values that were exactly 50 from your source grid (or above) become -50, doubling your points there.

Ways to address - increasing your max range might be something to explore here, or changing your max and min. If you can say a little more about what you’re up to with your instances there are probably other possible solutions.

Yes!

I got it to work! Thank you very much.

I tried adjusting the limit max before but it introduced some looping issues with the positions of the instances because I didn’t remember to change the range of the transform also. Then I got derailed and stuck because I thought that the problem wasn’t present in the single grid version.

Here is the finished patch. Now I can go to sleep happy and content after tackling this pesky problem.

Dodecahedron_snakes.toe (9.5 KB)

(Btw, thanks Matthew for all your great tutorials and blog posts, you are the reason I got deep enough in TouchDesigner to fall in love with it.)

1 Like

NICE! Glad to hear you got it all sorted.

Glad the tuts and posts have helped

Very beautiful! Well done!