[R] "Turtle world" graphics in R

Gabriel Baud-Bovy baud-bovy.gabriel at hsr.it
Tue Oct 14 12:51:03 CEST 2003


I would greatly appreciate some idea about the best approach to make a
graphical interface of for a turtle world in R.

In the turtle environment, the user controls movements of a turtle
through the command line (e.g. forward(10), turn(5), etc.).  The turtle should
be displayed in the new position and heading after each command.
Also, the turtle's path and, possibly, objects (squares, barriers, ...) with
which turtle might interact should be displayed.

Thank you,

Gabriel

PS: Right now, I am using basic plotting R functions to plot the turtle
and its path. Before each turtle's movement, I "erase" the turtle be redrawing
it with the same color as the background but that does not look good as it
also erases everything ese. I tought of using large matrix (e.g 1000x1000) as
a representation of the turtle world and displaying it with contour() but 
it is slow
to update after each user command.

PPS: I did ask a similar question 1 month ago but did not get any answer. 
Probably
that my question was too long... I just would like to know if I am missing 
possibilites.
--------------------------------------------------------------------
Gabriel Baud-Bovy
Assistant Professor
UHSR University
via Olgettina, 58	tel:  (+39) 02 2643 4839
20132 Milan, Italy	fax: (+39) 02 2643 4892




More information about the R-help mailing list