I am trying to implement a grid system. I want to be able to create a grid system of points from one centered initial point in red. Then to find the top right point in purple and find all of the other points in the grid in orange. This works in one orientation, but not in others. I must be doing something wrong in my point calculations but I don’t understand what.
Here is a section of my code for calculating these points. The Set_Org_List function organizes the poses.
better picture of my code
I think you might need to have the loop within the loop
i := …
j := …
while (i < …)
while (j < …)
#code
j++
i++
j=0
something like this framework I think will work, I’m not 100% sure but I believe that’s how you index through a matrix/grid of stored data. Anyways hope that helps and best of luck!
Your code looks not that bad in principle. Can you give an example of a failure case?