[ros-users] random maze

Tim Field tfield at willowgarage.com
Tue Jun 22 04:41:27 UTC 2010


Typing *random maze image python* into Google and clicking *I'm Feeling
Lucky* gives me a page <http://natewm.com/blog/tag/python/> describing a
script <http://www.natewm.com/media/software/experiments/python/maze.py>which
outputs images like the following:

[image: maze_py_test.gif]

If you download that file, change the last line from:

img.save("maze.png")

to:

img.save("maze.pgm")

and run:

python maze.py

you'll get a file maze.pgm in the current directory.

Change the value of the step tuple on line 10 to make the maze hallways
larger or smaller.  The size tuple on line 9 will change the dimensions of
the maze image.

Hope that helps,
Tim

On Mon, Jun 21, 2010 at 8:47 PM, Narasimhan <narasimhan1990 at yahoo.co.in>wrote:

>
> still no reply
>
> "is there a way to create a random maze. in stage pkg we can change the
> maze
> by changing the .pgm file. but is there a way to create a random maze by a
> program or a program that creates a random .pgm file."
> --
> View this message in context:
> http://ros-users.122217.n3.nabble.com/random-maze-tp910643p913313.html
> Sent from the ROS-Users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> ros-users mailing list
> ros-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ros-users
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100621/0b228edd/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: maze_py_test.gif
Type: image/gif
Size: 3576 bytes
Desc: not available
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100621/0b228edd/attachment-0005.gif>


More information about the ros-users mailing list