There appears to be two implementation of turtle graphics for the PicoCalc, Pico Logo by @BlairLeduc and my own turtle module under zeptoforth.
For more information on Pico Logo, look at:
Pico Logo, of course, is a full implementation of the Logo language, of which turtle graphics is sadly but the most well-known feature. (Logo is really a classic Lisp minus all the parens.) I personally remember Logo from when I was in elementary school, but they never taught us about its features beyond turtle graphics. (Even then, I knew it was a better language than BASIC, though.)
The turtle module for zeptoforth, which can be seen at extra/rp_common/turtle_picocalc.fs, is another option. It is designed so its turtle graphics API is mostly compatible with that of Thurtle, a WAForth-based turtle graphics system that runs in the browser, and it has full access to the zeptoforth environment.
I am surprised that no one here has come out with a turtle graphics system for MMBasic, as that would be something that seems like it would be natural to implement. Is this perhaps due to the limitations of libraries under MMBasic, or is there not enough room to implement turtle graphics as part of MMBasic itself (cf. the thread here about MMBasic being ‘done’)?
Some key differences between the two is that Pico Logo, at least on the RP2350, uses floating-point, whereas the turtle module for zeptoforth’s API uses integers and it uses S31.32 fixed-point math internally. Other differences include that Pico Logo uses palette color with 256 colors selected from 65536 colors, whereas the turtle module for zeptoforth internally uses RGB332 color even though colors are selected as components of 0 to 255.
I am surprised more people have not tried out Pico Logo, especially since Logo is actually an all-around very nice language. You guys should try it out!
As for zeptoforth, it is not nearly as forgiving as Logo, e.g. if you recurse too deep you can cause undefined behavior or simply crash, requiring a reboot. Yet at the same time, if you want to use zeptoforth the turtle module provides easy means to draw graphics, and in most cases you can avoid writing code that uses words such as @ or ! which directly peek or poke memory.
Of course, I cannot help but give out some info on turtle graphics under zeptoforth, so here goes…
The API of the turtle module for zeptoforth consists of the following words:
setpencolor ( r g b -- )
setturtlecolor ( r g b -- )
forward ( pixels -- )
backward ( pixels -- )
left ( degrees -- )
right ( degrees -- )
penup ( -- )
pendown ( -- )
getpendown ( -- pendown? )
setxy ( x y -- )
getxy ( -- x y )
setheading ( degrees -- )
getheading ( -- degrees )
hideturtle ( -- )
showturtle ( -- )
getshowturtle ( -- showturtle? )
updateoff ( -- )
updateon ( -- )
getupdateon ( -- updateon? )
setpensize ( pixels -- )
getpensize ( -- pixels )
clear ( -- )
home ( -- )
These should be self-explanatory, especially if you have dealt with turtle graphics elsewhere.
Of course, this thread would not be complete without some screenshots, so here is one:
The code for this:
begin-module spin-square
turtle import
: draw-spin-square ( -- )
page
home
clear
penup
1 forward 90 right 1 forward 90 right
pendown
200 2 ?do
i forward
89 right
loop
;
end-module





