Il fiore verde
2 posters
Il fiore verde
Salve,
inizio a giocare e con questo codice
CIRCLE 150
PENUP
FORWARD 75
POINT
BACK 75
RIGHT 60
FORWARD 75
POINT
CLOSE
Dando il comando di play (fai) tre volte, ricavo questo bel fiore verde.
inizio a giocare e con questo codice
CIRCLE 150
PENUP
FORWARD 75
POINT
BACK 75
RIGHT 60
FORWARD 75
POINT
CLOSE
Dando il comando di play (fai) tre volte, ricavo questo bel fiore verde.
nicomarti- Posts : 19
Join date : 2017-01-06
LA STELLA GIALLA
PENUP
REPEAT 5 [
FORWARD 100
POINT
BACK 100
RIGHT 360/10
FORWARD 70
POINT
BACK 70
RIGHT 360/10
]
FILLCOLOR “GOLD”
FILL
nicomarti- Posts : 19
Join date : 2017-01-06
LE STELLE DELLO SCERIFFO (3-12 PUNTE)
TO star n m
PENUP
PENSIZE n/m
REPEAT m [
FORWARD n
PENCOLOR “GOLD”
POINT
BACK n
RIGHT 360/m/2
FORWARD n*0.6
PENCOLOR “INVISIBLE”
POINT
BACK n*0.6
RIGHT 360/m/2
]
PENCOLOR “INVISIBLE”
FILLCOLOR “GOLD”
FILL
PENSIZE n/m/3
FILLCOLOR “INVISIBLE”
PENCOLOR “WHITE”
PENDOWN
CIRCLE 2*n*0.6-n/m/3
PENUP
FONTSIZE n/4
FONTCOLOR “WHITE”
FONTFAMILY “Western”
TEXT “SHERIFF”
END
CLEARSCREEN
HOME
HIDETURTLE
PENUP
POSITION [130, 200]
HEADING 0
REPEAT 9 [
PICTURE [
star 70 2+REPCOUNT
]
RIGHT 90
FORWARD 160
LEFT 90
IF REPCOUNT % 3 = 0 [
BACK 160
RIGHT 90
BACK 160*3
LEFT 90
]
]
Con questo codice ottengo nove stelle gialle:
PENUP
PENSIZE n/m
REPEAT m [
FORWARD n
PENCOLOR “GOLD”
POINT
BACK n
RIGHT 360/m/2
FORWARD n*0.6
PENCOLOR “INVISIBLE”
POINT
BACK n*0.6
RIGHT 360/m/2
]
PENCOLOR “INVISIBLE”
FILLCOLOR “GOLD”
FILL
PENSIZE n/m/3
FILLCOLOR “INVISIBLE”
PENCOLOR “WHITE”
PENDOWN
CIRCLE 2*n*0.6-n/m/3
PENUP
FONTSIZE n/4
FONTCOLOR “WHITE”
FONTFAMILY “Western”
TEXT “SHERIFF”
END
CLEARSCREEN
HOME
HIDETURTLE
PENUP
POSITION [130, 200]
HEADING 0
REPEAT 9 [
PICTURE [
star 70 2+REPCOUNT
]
RIGHT 90
FORWARD 160
LEFT 90
IF REPCOUNT % 3 = 0 [
BACK 160
RIGHT 90
BACK 160*3
LEFT 90
]
]
Con questo codice ottengo nove stelle gialle:
nicomarti- Posts : 19
Join date : 2017-01-06
CAMBIANDO UN PO' IL CODICE
Cambiando elementi semplice, come il colore e il n° del REPEAT cosi:
TO star n m
PENUP
PENSIZE n/m
REPEAT m [
FORWARD n
PENCOLOR “gold”
POINT
BACK n
RIGHT 360/m/2
FORWARD n*0.6
PENCOLOR “INVISIBLE”
POINT
BACK n*0.6
RIGHT 360/m/2
]
PENCOLOR “INVISIBLE”
FILLCOLOR “blue”
FILL
PENSIZE n/m/3
FILLCOLOR “red”
PENCOLOR “pink”
PENDOWN
CIRCLE 2*n*0.6-n/m/3
PENUP
FONTSIZE n/4
FONTCOLOR “gold”
FONTFAMILY “Western”
TEXT “maestra”
END
CLEARSCREEN
HOME
HIDETURTLE
PENUP
POSITION [130, 200]
HEADING 0
REPEAT 12 [
PICTURE [
star 70 2+REPCOUNT
]
RIGHT 90
FORWARD 160
LEFT 90
IF REPCOUNT % 3 = 0 [
BACK 160
RIGHT 90
BACK 160*3
LEFT 90
]
]
ottengo queste stelle
TO star n m
PENUP
PENSIZE n/m
REPEAT m [
FORWARD n
PENCOLOR “gold”
POINT
BACK n
RIGHT 360/m/2
FORWARD n*0.6
PENCOLOR “INVISIBLE”
POINT
BACK n*0.6
RIGHT 360/m/2
]
PENCOLOR “INVISIBLE”
FILLCOLOR “blue”
FILL
PENSIZE n/m/3
FILLCOLOR “red”
PENCOLOR “pink”
PENDOWN
CIRCLE 2*n*0.6-n/m/3
PENUP
FONTSIZE n/4
FONTCOLOR “gold”
FONTFAMILY “Western”
TEXT “maestra”
END
CLEARSCREEN
HOME
HIDETURTLE
PENUP
POSITION [130, 200]
HEADING 0
REPEAT 12 [
PICTURE [
star 70 2+REPCOUNT
]
RIGHT 90
FORWARD 160
LEFT 90
IF REPCOUNT % 3 = 0 [
BACK 160
RIGHT 90
BACK 160*3
LEFT 90
]
]
ottengo queste stelle
nicomarti- Posts : 19
Join date : 2017-01-06
LA LUNA NERA
PENUP LEFT 23.45°
FILLCOLOR “BLACK” CIRCLE 6cm
RIGHT 90 FORWARD 2.25cm
FILLCOLOR “WHITE” CIRCLE 7.5cm
FILLCOLOR “BLACK” CIRCLE 6cm
RIGHT 90 FORWARD 2.25cm
FILLCOLOR “WHITE” CIRCLE 7.5cm
nicomarti- Posts : 19
Join date : 2017-01-06
RIPETENDO LA LUNA NERA
Ripetendo diverse volte il play e modificando un poco la posizione delle lune, con questo codice
PICTURE “power_sleep_black_cropped.svg” [
PENUP LEFT 23.45°
FILLCOLOR “BLACK” ELLIPSE [6cm, 6cm, 6h, 12h]
RIGHT 90 FORWARD 2.25cm LEFT 90
FILLCOLOR “WHITE”
ELLIPSE [7.5cm, 7.5cm, 6h+36.8°, 12h-36.8°, 2]
si ottiene:
PICTURE “power_sleep_black_cropped.svg” [
PENUP LEFT 23.45°
FILLCOLOR “BLACK” ELLIPSE [6cm, 6cm, 6h, 12h]
RIGHT 90 FORWARD 2.25cm LEFT 90
FILLCOLOR “WHITE”
ELLIPSE [7.5cm, 7.5cm, 6h+36.8°, 12h-36.8°, 2]
si ottiene:
nicomarti- Posts : 19
Join date : 2017-01-06
PER GIOCARE
Librelogo lo fa da sé...i bambini si divertiranno :-)
FONTCOLOR “GREEN”
LABEL “LIBRE”
PENUP
BACK 30
PICTURE [
FILLCOLOR ANY
CIRCLE 40
FONTCOLOR “BLACK”
LABEL “LOGO”
LEFT 180
FORWARD 20
PENDOWN
PENCOLOR ANY
PENSIZE 1
FORWARD 40
REPEAT 20 [
FORWARD REPCOUNT*2
RIGHT 90
]
]
PENUP POSITION ANY PENDOWN
FONTCOLOR “GREEN”
LABEL “LIBRE”
PENUP
BACK 30
PICTURE [
FILLCOLOR ANY
CIRCLE 40
FONTCOLOR “BLACK”
LABEL “LOGO”
LEFT 180
FORWARD 20
PENDOWN
PENCOLOR ANY
PENSIZE 1
FORWARD 40
REPEAT 20 [
FORWARD REPCOUNT*2
RIGHT 90
]
]
PENUP POSITION ANY PENDOWN
nicomarti- Posts : 19
Join date : 2017-01-06
IL TANGRAM
TO place x y
POSITION [200+x*40, 400-y*40]
END
TO line x y x2 y2
PENUP place x y
PENDOWN place x2 y2
END
TO grid x y x2 y2
REPEAT y2-y+1 [
line x y+REPCOUNT-1 x2 y+REPCOUNT-1
]
REPEAT x2-x+1 [
line x+REPCOUNT-1 y x+REPCOUNT-1 y2
]
END
PICTURE “drawtangram.svg” [
PENSIZE 2 HIDETURTLE
PENCAP “ROUND”
PENCOLOR “SILVER”
grid 0 0 4 4 SLEEP 1000
PENCOLOR “BLACK”
line 0 4 4 0 SLEEP 1000
line 2 4 4 2 SLEEP 1000
line 1 3 2 4 SLEEP 1000
line 0 0 3 3 SLEEP 1000
line 3 3 3 1 SLEEP 1000
FILLCOLOR “RED” line 0 0 0 4 place 2 2 FILL
FILLCOLOR “BLUE” line 0 0 4 0 place 2 2 FILL
FILLCOLOR “GREEN” line 0 4 2 4 place 1 3 FILL
FILLCOLOR “PURPLE” line 2 4 4 4 place 4 2 FILL
FILLCOLOR “LIME” line 3 1 2 2 place 3 3 FILL
FILLCOLOR “FUCHSIA” line 2 4 1 3 place 2 2 place 3 3 FILL
FILLCOLOR “YELLOW” line 3 1 3 3 place 4 2 place 4 0 FILL
SLEEP 2000
]
POSITION [200+x*40, 400-y*40]
END
TO line x y x2 y2
PENUP place x y
PENDOWN place x2 y2
END
TO grid x y x2 y2
REPEAT y2-y+1 [
line x y+REPCOUNT-1 x2 y+REPCOUNT-1
]
REPEAT x2-x+1 [
line x+REPCOUNT-1 y x+REPCOUNT-1 y2
]
END
PICTURE “drawtangram.svg” [
PENSIZE 2 HIDETURTLE
PENCAP “ROUND”
PENCOLOR “SILVER”
grid 0 0 4 4 SLEEP 1000
PENCOLOR “BLACK”
line 0 4 4 0 SLEEP 1000
line 2 4 4 2 SLEEP 1000
line 1 3 2 4 SLEEP 1000
line 0 0 3 3 SLEEP 1000
line 3 3 3 1 SLEEP 1000
FILLCOLOR “RED” line 0 0 0 4 place 2 2 FILL
FILLCOLOR “BLUE” line 0 0 4 0 place 2 2 FILL
FILLCOLOR “GREEN” line 0 4 2 4 place 1 3 FILL
FILLCOLOR “PURPLE” line 2 4 4 4 place 4 2 FILL
FILLCOLOR “LIME” line 3 1 2 2 place 3 3 FILL
FILLCOLOR “FUCHSIA” line 2 4 1 3 place 2 2 place 3 3 FILL
FILLCOLOR “YELLOW” line 3 1 3 3 place 4 2 place 4 0 FILL
SLEEP 2000
]
nicomarti- Posts : 19
Join date : 2017-01-06
PIRAMIDE DI CUBI
TO tile
LEFT 60
REPEAT 2 [
FORWARD 40 RIGHT 120 FORWARD 40 RIGHT 60
] FILL RIGHT 60
END
TO cube
colors = [“GOLD”, “TEAL”, “TOMATO”]
REPEAT 3 [
PENCOLOR colors[REPCOUNT-1]
FILLCOLOR colors[REPCOUNT-1]
tile
RIGHT 120
]
END
PICTURE “Reutersvärd triangle.svg” [
HIDETURTLE PENSIZE 0.1 RIGHT 30
REPEAT 3 [
REPEAT 3 [
PENUP FORWARD 60 PENDOWN
d = HEADING
HEADING 30
cube
HEADING d
]
RIGHT 120
]
]
Con REPCOUNT-2
LEFT 60
REPEAT 2 [
FORWARD 40 RIGHT 120 FORWARD 40 RIGHT 60
] FILL RIGHT 60
END
TO cube
colors = [“GOLD”, “TEAL”, “TOMATO”]
REPEAT 3 [
PENCOLOR colors[REPCOUNT-1]
FILLCOLOR colors[REPCOUNT-1]
tile
RIGHT 120
]
END
PICTURE “Reutersvärd triangle.svg” [
HIDETURTLE PENSIZE 0.1 RIGHT 30
REPEAT 3 [
REPEAT 3 [
PENUP FORWARD 60 PENDOWN
d = HEADING
HEADING 30
cube
HEADING d
]
RIGHT 120
]
]
Con REPCOUNT-2
Last edited by nicomarti on Sun Jan 08, 2017 10:07 am; edited 1 time in total
nicomarti- Posts : 19
Join date : 2017-01-06
EUROPA
; go to a vertex and store its coordinate
TO vertex vertices n
FORWARD n
where = POSITION
vertices += [where]
BACK n
END
TO star n
golden_ratio = (1 + SQRT 5)/2
vertices = []
HEADING 0
REPEAT 5 [
vertex vertices n
RIGHT 360/10
vertex vertices n - n / golden_ratio
RIGHT 360/10
]
; join vertices (from the 2nd vertex)
FOR i IN vertices [ POSITION i PENDOWN ]
FILL PENUP
END
PICTURE “Flag_of_Europe_with_border.svg” [
HIDETURTLE
FILLCOLOR “WHITE”
PENCOLOR “INVISIBLE”
RECTANGLE [15cm+2*10cm/25, 10cm+2*10cm/25]
FILLCOLOR 0x003399
RECTANGLE [15cm, 10cm]
FILLCOLOR 0xffcc00
REPEAT 12 [
PENUP
HEADING 360/12 * (REPCOUNT - 1)
FORWARD 10cm*2/6
star 10cm/18
HOME
]
]
TO vertex vertices n
FORWARD n
where = POSITION
vertices += [where]
BACK n
END
TO star n
golden_ratio = (1 + SQRT 5)/2
vertices = []
HEADING 0
REPEAT 5 [
vertex vertices n
RIGHT 360/10
vertex vertices n - n / golden_ratio
RIGHT 360/10
]
; join vertices (from the 2nd vertex)
FOR i IN vertices [ POSITION i PENDOWN ]
FILL PENUP
END
PICTURE “Flag_of_Europe_with_border.svg” [
HIDETURTLE
FILLCOLOR “WHITE”
PENCOLOR “INVISIBLE”
RECTANGLE [15cm+2*10cm/25, 10cm+2*10cm/25]
FILLCOLOR 0x003399
RECTANGLE [15cm, 10cm]
FILLCOLOR 0xffcc00
REPEAT 12 [
PENUP
HEADING 360/12 * (REPCOUNT - 1)
FORWARD 10cm*2/6
star 10cm/18
HOME
]
]
nicomarti- Posts : 19
Join date : 2017-01-06
IL CUBO DI RUBICK
TO side color
REPEAT 3 [
REPEAT 3 [
PENDOWN
FILLCOLOR “BLACK”
SQUARE [30, 30, 2.5]
FILLCOLOR color
SQUARE [28, 28, 3]
PENUP FORWARD 30
] RIGHT 90 FORWARD 30 LEFT 90 BACK 30*3
]
END
HIDETURTLE PENSIZE 2
PICTURE “cube.svg” [
side 0x009B48 ; Pantone 347 C
side 0xB71234 ; Pantone 200 C
side 0x0046AD ; Pantone 293 C
side 0xFF5800 ; Pantone Orange 021 C
BACK 30*3 RIGHT 90 BACK 30*3*3 LEFT 90
side 0xFFD500 ; Pantone Yellow 012 C
FORWARD 30*3*2 RIGHT 90 BACK 30*3 LEFT 90
side 0xFFFFFF
]
REPEAT 3 [
REPEAT 3 [
PENDOWN
FILLCOLOR “BLACK”
SQUARE [30, 30, 2.5]
FILLCOLOR color
SQUARE [28, 28, 3]
PENUP FORWARD 30
] RIGHT 90 FORWARD 30 LEFT 90 BACK 30*3
]
END
HIDETURTLE PENSIZE 2
PICTURE “cube.svg” [
side 0x009B48 ; Pantone 347 C
side 0xB71234 ; Pantone 200 C
side 0x0046AD ; Pantone 293 C
side 0xFF5800 ; Pantone Orange 021 C
BACK 30*3 RIGHT 90 BACK 30*3*3 LEFT 90
side 0xFFD500 ; Pantone Yellow 012 C
FORWARD 30*3*2 RIGHT 90 BACK 30*3 LEFT 90
side 0xFFFFFF
]
nicomarti- Posts : 19
Join date : 2017-01-06
Riparto da zero, che è meglio...
Tutto bello, ma riparto da capo...
FORWARD 100 ---->>>vai avanti di cento
RIGHT 90 ---->>>ruota di 90 gradi
FORWARD 100
RIGHT 90
FORWARD 100
RIGHT 90
FORWARD 100
RIGHT 90
Il comando ripetuto 4 volte, dà un quadrato, ma se diminuisco l'ampiezza dell'angolo e ripeto il comando per 6 volte, ottengo un esagono.
FORWARD 100
RIGHT 60
FORWARD 100
RIGHT 60
FORWARD 100
RIGHT 60
FORWARD 100
RIGHT 60
FORWARD 100
RIGHT 60
FORWARD 100
RIGHT 60
Diminuendo ancora l'angolo e ripetendo 12 volte, ecco apparire il dodecaedro
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
Il cerchio
REPEAT [ FORWARD 1 RIGHT 1 ]
Il triangolo equilatero
FORWARD 100 RIGHT 120 FORWARD 100 RIGHT 120 FORWARD 100 END
Ripetendo tre volte il comando:
Aggiungendo RIGHT 60 prima di EDND
Il rettangolo:
FORWARD 150
RIGHT 90
FORWARD 80
RIGHT 90
FORWARD 150
RIGHT 90
FORWARD 80
END
FORWARD 100 ---->>>vai avanti di cento
RIGHT 90 ---->>>ruota di 90 gradi
FORWARD 100
RIGHT 90
FORWARD 100
RIGHT 90
FORWARD 100
RIGHT 90
Il comando ripetuto 4 volte, dà un quadrato, ma se diminuisco l'ampiezza dell'angolo e ripeto il comando per 6 volte, ottengo un esagono.
FORWARD 100
RIGHT 60
FORWARD 100
RIGHT 60
FORWARD 100
RIGHT 60
FORWARD 100
RIGHT 60
FORWARD 100
RIGHT 60
FORWARD 100
RIGHT 60
Diminuendo ancora l'angolo e ripetendo 12 volte, ecco apparire il dodecaedro
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
FORWARD 100
RIGHT 30
Il cerchio
REPEAT [ FORWARD 1 RIGHT 1 ]
Il triangolo equilatero
FORWARD 100 RIGHT 120 FORWARD 100 RIGHT 120 FORWARD 100 END
Ripetendo tre volte il comando:
Aggiungendo RIGHT 60 prima di EDND
Il rettangolo:
FORWARD 150
RIGHT 90
FORWARD 80
RIGHT 90
FORWARD 150
RIGHT 90
FORWARD 80
END
nicomarti- Posts : 19
Join date : 2017-01-06
Re: Il fiore verde
LibreLogo è come le ciliegie... un codice tira l'altro...
nicomarti- Posts : 19
Join date : 2017-01-06
Similar topics
» DAI POLIGONI AL FIORE
» Abbellire il fiore
» PICCOLO FIORE
» Tentativo di disegnare un fiore
» un nuovo tentativo di disegnare un fiore
» Abbellire il fiore
» PICCOLO FIORE
» Tentativo di disegnare un fiore
» un nuovo tentativo di disegnare un fiore
Permissions in this forum:
You cannot reply to topics in this forum