netlogo - Why doesn't this always create a triangle? -


i expect code create triangle each time, instead many times goes through wrap-around, creating zigzag line or disconnected angle pieces. why that? bug?

create go button (not forever button) run code

to go    clear-all    create-turtles 3    ask turtles      [ setxy random-xcor random-ycor       create-links-to (other turtles)]  end 

the links take shortest path, may go around world edges, (in default world topology) connected each other.

go "settings..." dialog , turn off wrapping if isn't behavior wanted.

see http://ccl.northwestern.edu/netlogo/docs/programming.html#topology details.


Comments

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -