Consider the picture below. I have the coordinates of the black center pixel. I need a loop to get the coordinates of the white path around the center. The loop must take into account the varying size of each picture. For instance from left to right, a variable (lets say radius) would have the value 1, 2 and 3 respectively.
This is part of my pathfinding app. I take the coordinates of each "pixel" on the white path and add a weighting factor to it. This is the distance as the crow flies. For example in the right picture, the red square would be int(sqrt(3^2+3^2)*10)=42
Even better would be if I could use a circle instead of a square!
Thanks for any help.
This is part of my pathfinding app. I take the coordinates of each "pixel" on the white path and add a weighting factor to it. This is the distance as the crow flies. For example in the right picture, the red square would be int(sqrt(3^2+3^2)*10)=42
Even better would be if I could use a circle instead of a square!
Thanks for any help.