Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netlogo - Origin in the corner with code

Tags:

netlogo

I need to have a martix of patches which axis are long a power of 2 ( 2^n ) for example 16.

I thought this can be done or having the corner but i need to do this with a line of code because i want it to be set with the setup button.

like image 992
AndreA Avatar asked Feb 15 '26 23:02

AndreA


1 Answers

You can do this with resize-world:

resize-world 0 (2 ^ n - 1) 0 (2 ^ n - 1)

You may also want to set the patch size with set-patch-size so that the view remains stays the same size no matter how many patches you have:

set-patch-size 400 / (2 ^ n)

like image 174
Bryan Head Avatar answered Feb 21 '26 15:02

Bryan Head