Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to draw Grid World using Python

Tags:

python

draw

grid

I want to draw a Grid World (similar to a table), where cells may contain robots or obstacles. A dot/arrow would do to represent the robot and colouring the cells in black for examples could represent the obstacles.

I am not looking for anything complicated, just a simple python library that would help me do this. Any suggestions?

like image 915
Karan Avatar asked Jul 25 '26 16:07

Karan


1 Answers

tkinter has a canvas widget that is pretty easy to work with. It has primitives for lines and filled polygons and circles and so on. And with the event loop its pretty easy to do simple animations.

like image 135
Bryan Oakley Avatar answered Jul 27 '26 07:07

Bryan Oakley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!