Your approach doesn't work, because you are not modifying any pcolors of patches in the landscape. The stamp
command only leaves an image of the largecircle turtle, but the pcolors underneath still remain blue. Thus, your smallcircles are still allowed to move anywhere even within the stamp area of your largecircle.
To solve this, you need a different approach. Turtle shapes in NetLogo are useful for generating visual output of your model. But it is not possible to identify patches which are covered by a certain turtle shape. Even though a turtles visual shape can cover several patches, its location is still limited to one specific patch.
It's hard to recommend an approach without knowing, what you are exactly planning to do with your model. However, here is a solution that comes close to your provided code example:
breed [smallcircle sc]
globals [largecircle]
to setup
ca
ask patches with [(pxcor > min-pxcor) and (pxcor < (max-pxcor))][
set pcolor blue
]
;store patches within radius of center patch as global
ask patch 0 0 [
set largecircle patches in-radius (10 / 2)
]
;set color of largecircle patches green
ask largecircle [
set pcolor green
]
;create small circles and move to random location outside largecircle
create-smallcircle 50 [
set shape "circle"
move-to one-of patches with [not member? self largecircle]
]
end
I removed the largecircle breed and instead created a global variable largecircle
.
The largecircle is then created by asking the center patch, identifying all patches within a certain radius and store these patches in the global variable largecircle
. We can now use this patch-set to set the pcolor of largecircle-patches or to control the movement of the small circles.