add simple and random walker

This commit is contained in:
lee2sman 2021-02-14 02:41:20 -05:00
parent 6315ec29d7
commit da191ae694
4 changed files with 5 additions and 33 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

View File

@ -1,30 +0,0 @@
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())
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

@ -1,11 +1,12 @@
function turtle(){
bg('blue')
penColor('pink')
penSize(12)
forward(randint())
back(200)
right(90)
penColor('blue')
for (let i = 0; i < 13; i++){
forward(170)
@ -16,6 +17,7 @@ function turtle(){
right(10)
back(18)
}
}