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

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -