How to draw a curved corridor?

22 views
Skip to first unread message

Mustafa Ali Saba

unread,
Oct 6, 2019, 7:45:40 PM10/6/19
to netlogo-users
Dear comunity,

I have the following code for a simple corridor.

to draw-curved
  ask patches
[set pcolor 9]
 
  ask patches
with [abs pycor = corridor-width][
   
set pcolor 0
 
]
end

I have attached my actual straight line corridor, but I want a curved one
in terms of an angle or a trig function for drawing it.

curved.png

Thanks..
---------------------
Mustafa Ali

core view.png

Pradeesh Kumar K V

unread,
Oct 7, 2019, 3:13:26 AM10/7/19
to netlogo-users
Hello Mustafa,

Perhaps you could make an agent to traverse the desired path and set the patches covered by the agent to the desired color.

For the path you may reset the heading with every tick.

Regards,

Pradeesh

--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/01a8a689-231a-49b7-9e78-aed5d0a33276%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages