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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -