Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
coordX = 40.782393
coordY = -73.966601
maxSize = 10
x = 0
y = 0
dx= 0
dy = -1
i = 0
while i < maxSize**2:
if (-maxSize/2 < x <= maxSize/2) and (-maxSize/2 < y <= maxSize/2):
print("{},{}".format((x * 0.0025) + coordX, (y * 0.0025 ) + coordY))
if x == y or (x < 0 and x == -y) or (x > 0 and x == 1-y):
dx, dy = -dy, dx
x, y = x+dx, y+dy
i+=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.