add retro random walker example

This commit is contained in:
lee2sman 2021-02-14 02:40:30 -05:00
parent 94ed08bd34
commit b147168a0f
2 changed files with 30 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

View File

@ -0,0 +1,30 @@
function turtle(){
retro()
for (let j = 0; j < 10; j++){
penup()
setpos(0,0)
pendown()
for (let i = 0; i < 2000; i++){
penSize(randint(30))
if (randint()<50)
{
penup()
} else
{
pendown()
}
forward(randint())
right(randint())
}
}
}