xyboox
Yes, that is possible, but instead of using the IID to access the points store all the points in an array.
Then do these changes to the expressions:
p(n).x -> Array.At(n % Array.Width, 0)
p(n).y -> Array.At(n % Array.Width, 1)
p(n+1).x -> Array.At((n+1) % Array.Width, 0)
p(n+1).y -> Array.At((n+1) % Array.Width, 1)
p(n-1).x -> Array.At((n-1) % Array.Width, 0)
p(n-1).y -> Array.At((n-1) % Array.Width, 1)