add eexample code files and images
This commit is contained in:
parent
4fb8e5cbbc
commit
94ed08bd34
Binary file not shown.
After Width: | Height: | Size: 156 KiB |
|
@ -0,0 +1,31 @@
|
|||
function turtle(){
|
||||
bg('pink')
|
||||
|
||||
for (let j = 0; j < 10; j++){
|
||||
|
||||
penup()
|
||||
setpos(0,0)
|
||||
pendown()
|
||||
|
||||
for (let i = 0; i < 2000; i++){
|
||||
|
||||
penSize(randint(255))
|
||||
penColor(color(randint(255),randint(255),randint(255)))
|
||||
|
||||
if (randint()<50)
|
||||
{
|
||||
penup()
|
||||
} else
|
||||
{
|
||||
pendown()
|
||||
}
|
||||
|
||||
forward(randint())
|
||||
right(randint())
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
|
@ -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())
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 63 KiB |
|
@ -0,0 +1,22 @@
|
|||
function turtle(){
|
||||
|
||||
bg('blue')
|
||||
|
||||
penColor('pink')
|
||||
penSize(12)
|
||||
|
||||
forward(randint())
|
||||
|
||||
for (let i = 0; i < 13; i++){
|
||||
forward(170)
|
||||
left(120)
|
||||
|
||||
forward(180)
|
||||
|
||||
right(10)
|
||||
|
||||
back(18)
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue