say we want to generate a zig-zag set of points as a numpy array like the following image such that the array elements' order is similar to moving on the path:
we are given:
- The bounds where this path should be in (e.g., the above image has x=[-2500:2500], y=[-200, 200])
- the starting point that defines the order of points in such path (e.g., in the blow image it is (2500, 200)
- teeth direction (e.g., the below image is in y) direction, that is why the starting point starts going down in the beginning)
- the step size between each point (e.g., 10)
- the width of each teeth
What is the simplest way to generate such numpy array? I tried scipy square wave but aside from other required features it only generates the teeth edge points but not all the path in a way that can be shown with scatter plot


Apologies in advance for ignoring your starting point and teeth direction. I started without considering them and when I was finished and only had to add them I thought that you can very likely do that yourself. I also think there could be a more pretty solution to your x pixel point distance request than just getting a lot of points and filtering them so that is satisfied. Let me know if that's important to you. That aside I think this is a nice solution.