-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from raspberrypilearning/draft
Update translation
- Loading branch information
Showing
24 changed files
with
466 additions
and
104 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
nl-NL/code/powerful_patterns_art_deco_wallpaper_example/main.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/python3 | ||
|
||
from p5 import * | ||
from random import randint | ||
|
||
|
||
def motief(): | ||
global cirkel_grootte | ||
for i in range(5): | ||
ellipse(0, 0, cirkel_grootte / 5 * (5 - i), cirkel_grootte / 5 * (5 - i)) | ||
|
||
|
||
def setup(): | ||
size(400, 400) | ||
print('🖌 Deze kunst gebruikt veel cirkels!') | ||
|
||
global cirkel_grootte | ||
|
||
cirkel_grootte = 50 | ||
|
||
|
||
def draw(): | ||
# Patroonkleuren | ||
stroke(40, 35, 100) # blauw | ||
stroke_weight(2) # dikke rand | ||
fill(200, 180, 128) # goud | ||
|
||
translate(0, 0) # start vanaf de linkerbovenhoek van het scherm | ||
|
||
if frame_count <= 16: # maakt 16 rijen en stopt dan | ||
for row in range(frame_count): # animeert 1 rij tegelijk | ||
for shape in range(16): # maak een rij motieven | ||
motief() | ||
translate(cirkel_grootte / 2, 0) | ||
translate(-with, circle_grootte / 2) # ga naar beneden om de volgende rij te beginnen | ||
|
||
|
||
run(frame_rate=3) |
3 changes: 3 additions & 0 deletions
3
nl-NL/code/powerful_patterns_art_deco_wallpaper_example/project_config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: "Krachtige patronen: voorbeeld van art deco-behang" | ||
identifier: "art-deco-example" | ||
type: 'python' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/python3 | ||
|
||
from p5 import * | ||
from time import * | ||
|
||
# Gebaseerd op de prachtige Maleisische geometrische taartkunst: Kek lapis Sarawak | ||
|
||
|
||
def kwadrant(): | ||
# Kies een aantal prachtige kleuren voor de taartlagen | ||
turkoois = Color(64, 224, 208) | ||
goud = Color(255, 215, 0) | ||
tomaat = Color(255, 99, 71) | ||
|
||
# Jam plakt de lagen aan elkaar | ||
jam = Color(255, 165, 0) | ||
stroke(jam) | ||
stroke_weight(2) # Wijzig het getal om de hoeveelheid jam te wijzigen | ||
|
||
# Negen lagen cake, waarbij de 3 kleuren 3 keer worden herhaald | ||
for i in range(3): | ||
start_y = i * 60 # hoogte van 3 blokken cake | ||
fill(turkoois) | ||
rect(0, start_y, 180, 20) | ||
fill(goud) | ||
rect(0, start_y + 20, 180, 20) | ||
fill (tomaat) | ||
rect(0, start_y + 40, 180, 20) | ||
|
||
|
||
def buitenste(): | ||
# De cake is verpakt in een buitenste laag | ||
geelgroen = Color(154, 205, 50) | ||
|
||
no_fill() # Bedek de taartkwadranten niet! | ||
stroke(geelgroen) | ||
stroke_weight(20) | ||
rect(10, 10, 380, 380, 20) | ||
|
||
|
||
def setup(): | ||
size(400, 400) # maak de taart vierkant | ||
achtergrond(255, 255, 255, 0) # transparante achtergrond | ||
|
||
|
||
def draw(): | ||
# Definieer een kwartslag zodat onze code gemakkelijk te lezen is | ||
kwart = radians(90) | ||
|
||
translate(200, 200) # start vanuit het midden | ||
|
||
# Maak het kwart rechtsonder van de cake en draai dan voor de andere kwarten | ||
|
||
if frame_count <= 4: # teken maximaal 4 kwadranten | ||
for i in range(frame_count): | ||
kwadrant() | ||
roteren (kwartl) | ||
|
||
if frame_count == 5: # voeg de buitenste laag toe | ||
translate(-200, -200) # terug naar de bovenhoek | ||
buitenste() # buitenste laag | ||
|
||
|
||
run(frame_rate=5) # 5 frames per seconde |
3 changes: 3 additions & 0 deletions
3
nl-NL/code/powerful_patterns_kek_lepis_sarawak/project_config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: "Krachtige patronen: voorbeeld van Kek Lepis Sarawak" | ||
identifier: "repeated-patterns-example" | ||
type: 'python' |
77 changes: 77 additions & 0 deletions
77
nl-NL/code/powerful_patterns_mcewen_tartan_example/main.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/bin/python3 | ||
|
||
from p5 import * | ||
|
||
|
||
def setup(): | ||
size(400, 400) | ||
|
||
|
||
def draw(): | ||
lines = 10 * frame_count # Gebruik de breedte/lengte van de vorm om in de loop van de tijd te animeren | ||
|
||
# McEwen tartan kleuren | ||
# Kleuren van de basisvierkanten | ||
BLAUW = Color(83, 143, 200) | ||
GREEN = Color(78, 163, 162) | ||
BASIS_KLEUREN = [GROEN, BLAUW] | ||
|
||
# Kruiskleuren | ||
GEEL = Color(155, 176, 135) | ||
ROOD = Color(155, 129, 113) | ||
KRUIS_KLEUREN = [GEEL, ROOD] | ||
|
||
# Kleur van het stiksel en overlappende kleur | ||
GRIJS = Color(78, 99, 86) | ||
|
||
# Teken afwisselend alle GROENE en BLAUWE basisvierkanten | ||
no_stroke() | ||
y_coördinaat = 0 | ||
vierkanten = width/vierkant_grootte | ||
|
||
for i in range(int(vierkanten)): | ||
gap = 0 | ||
for j in range(int(vierkanten)): | ||
fill(BASIS_KLEUREN[j % 2]) # GROEN en BLAUW | ||
rect(gap, y_coördinaat, vierkant_grootte, vierkant_grootte) | ||
opening = opening + vierkant_grootte | ||
y_coördinaat = y_coördinaat + vierkant_grootte | ||
|
||
# Kruizen | ||
stroke(GRIJS) | ||
|
||
# TEKEN afwisselend DE GELE en RODE kruizen | ||
for i in range(4): | ||
fill(GEEL) | ||
kruis = vierkant_grootte / 2 - 2 | ||
for i in range(int(vierkanten/2)): | ||
fill(KRUIS_KLEUREN[1% 2]) #GEEL en ROOD | ||
rect(kruis, 0, 4, lijnen) | ||
rect(0, kruis, lijnen, 4) | ||
kruis = kruis + 2 * vierkant_grootte | ||
# Teken de stikkruisen | ||
no_fill() | ||
kruis = vierkant_grootte + vierkant_grootte / 2 - 2 | ||
for i in range(int(vierkanten)): | ||
rect(kruis, 0, 4, lijnen) | ||
rect(0, kruis, lijnen, 4) | ||
kruis = kruis + * vierkant_grootte | ||
|
||
# Teken de grijze lijnen waar het materiaal overlapt | ||
no_stroke() | ||
fill(GRIJS, 100) | ||
gap = vierkant_grootte - 4 | ||
for i in range(int(vierkanten)): | ||
rect(gap, 0, 8, lijnen) | ||
gap = gap + vierkant_grootte | ||
gap = vierkant_grootte - 4 | ||
for i in range(int(vierkanten)): | ||
rect(0, gap, lijnen, 8) | ||
gap = gap + vierkant_grootte | ||
|
||
|
||
print('🏴 Dit is McEwen Tartan 🏴') | ||
vierkante_grootte = int( | ||
input('Welke maat 🏴tartan wil je graag hebben? 20, 50 of 100')) | ||
|
||
run(frame_rate=10) |
3 changes: 3 additions & 0 deletions
3
nl-NL/code/powerful_patterns_mcewen_tartan_example/project_config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: "Krachtige patronen: McEwen Tartan" | ||
identifier: "mcewen-tartan-example" | ||
type: 'python' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/python3 | ||
|
||
from p5 import * | ||
from random import randint | ||
|
||
|
||
def teken_motief(): | ||
oranje = Color(191, 64, 191) | ||
bruin = Color(200, 120, 0) | ||
groen = Color(100, 155, 0) | ||
fill(oranje) | ||
ellipse(200, 200, 200, 190) | ||
fill(0) | ||
# Ogen | ||
ellipse(160, 190, 30, 30) | ||
ellipse(240, 190, 30, 30) | ||
fill(255) | ||
ellipse(165, 200, 10, 10) | ||
ellipse(245, 200, 10, 10) | ||
# Mond | ||
no_fill() | ||
stroke(255, 255, 255) | ||
ellipse(150, 250, 30, 30) | ||
ellipse(250, 250, 30, 30) | ||
fill(255, 255, 255) | ||
no_stroke() | ||
rect(150, 230, 100, 40) | ||
fill(108, 200, 206) | ||
rect(152, 235, 96, 30) | ||
|
||
|
||
def setup(): | ||
size(400, 400) | ||
background(255) | ||
no_stroke() | ||
|
||
|
||
def draw(): | ||
push_matrix() | ||
# gecompenseerd door de breedte van het kwartgrote gezicht | ||
translate(randint(-50, 350), randint(-50, 350)) | ||
scale(0.25, 0.25) # kwart grootte paden | ||
teken_motief() | ||
pop_matrix() | ||
|
||
|
||
run(frame_rate=10) |
3 changes: 3 additions & 0 deletions
3
nl-NL/code/powerful_patterns_random_faces_example/project_config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: "Krachtige patronen: willekeurige gezichten" | ||
identifier: "random-faces-example" | ||
type: 'python' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/python3 | ||
|
||
from p5 import * | ||
from math import random | ||
from random import randint | ||
|
||
|
||
def motief(): | ||
fill(randint(0, 255), randint(0, 255), randint(0, 255)) | ||
ellipse(0, 0, 25, 25) | ||
fill(0, 0, 0) | ||
ellipse(0, 0, 15, 15) | ||
fill(randint(0, 255), randint(0, 255), randint(0, 255)) | ||
for i in range(4): # een korte rij vierkanten | ||
rect(i * 5, 0, 5, 5) | ||
|
||
|
||
def setup(): | ||
size(400, 400) | ||
stroke_weight(2) # dikke rand | ||
background(255) | ||
|
||
|
||
def draw(): | ||
translate(200, 200) # start vanaf de linkerbovenhoek van het scherm | ||
if frame_count < 150: | ||
for i in range(frame_count): # animeert het patroon | ||
motief() | ||
rotate(5) # draait het motief | ||
translate(i, i) # verplaatst het motief | ||
|
||
|
||
run(frame_rate=10) # snelle animatie |
3 changes: 3 additions & 0 deletions
3
nl-NL/code/powerful_patterns_spirals_example/project_config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: "Krachtige patronen: spiralen" | ||
identifier: "spirals-pattern-example" | ||
type: 'python' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/python3 | ||
|
||
from p5 import * | ||
from random import randint | ||
|
||
|
||
def setup(): | ||
# Zet de code om eenmalig uit te voeren hier onder | ||
size(400, 400) | ||
background(255, 255, 255) | ||
|
||
|
||
def draw(): | ||
# Zet hier code om bij elk frame uit te voeren | ||
fill(255, 0, 255) | ||
rect(50, 50, 120, 100) | ||
|
||
|
||
# Bewaar dit om je code uit te voeren | ||
run(frame_rate=5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: "Krachtige patronen" | ||
identifier: "powerful-patterns-starter" | ||
type: 'python' |
66 changes: 66 additions & 0 deletions
66
nl-NL/code/powerful_patterns_yakan_weaving_example/main.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/python3 | ||
|
||
from p5 import * | ||
from math import random | ||
|
||
|
||
def motief(): | ||
motief_grootte = 100 | ||
|
||
# Kleuren van de draad | ||
ORANJE = Color(254, 96, 1) | ||
PAARS = Color(135, 18, 192) | ||
GEEL = Color(243, 200, 19) | ||
BLAUW = Color(83, 171, 176) | ||
|
||
# Vierkanten | ||
fill(ORANJE) | ||
rect(0, 0, motief_grootte/2, motief_grootte/2) | ||
fill(PAARS) | ||
rect(50, 0, motief_grootte/2, motief_grootte/2) | ||
fill(GEEL) | ||
rect(0, 50, motief_grootte/2, motief_grootte/2) | ||
fill(BLAUW) | ||
rect(50, 50, motief_grootte/2, motief_grootte/2) | ||
fill(PAARS) | ||
rect(0, 0, motief_grootte/4, motief_grootte/4) | ||
fill(ORANJE) | ||
rect(50, 0, motief_grootte/4, motief_grootte/4) | ||
fill(BLAUW) | ||
rect(0, 50, motief_grootte/4, motief_grootte/4) | ||
fill(GEEL) | ||
rect(50, 50, motief_grootte/4, motief_grootte/4) | ||
|
||
|
||
def draai_motief(): | ||
for shape in range(5): # maak een rij motieven | ||
push_matrix() # instellingen opslaan | ||
rotate(radians(45)) # vorm 45 graden draaien | ||
motief() | ||
pop_matrix() # ga terug naar opgeslagen instellingen | ||
translate(motief_breedte, 0) # horizontaal bewegen | ||
|
||
|
||
def setup(): | ||
size(400, 400) | ||
background(250, 5, 94) # roze | ||
no_stroke() | ||
print('Dit is 🇵🇭 Yakan-weven ') | ||
|
||
|
||
def draw(): | ||
global motief_breedte | ||
motief_breedte = 150 | ||
|
||
translate(-motif_width/2, -motif_width/2) # om te beginnen met halve motieven | ||
|
||
if frame_count < 20: # maximum rijen | ||
for row in range(frame_count): | ||
roteer_motief() | ||
if row / 2 == 0: # om het patroon op de volgende rij te verschuiven | ||
translate(-motif_width * 5 + 75, 80) | ||
else: | ||
translate(-motif_width * 5 - 75, 80) | ||
|
||
|
||
run(frame_rate=3) |
3 changes: 3 additions & 0 deletions
3
nl-NL/code/powerful_patterns_yakan_weaving_example/project_config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: "Krachtige patronen: Yakan-weven" | ||
identifier: "yakan-weaving-example" | ||
type: 'python' |
Oops, something went wrong.