paloEpePeo
→ randomSeed()Sets the seed for `paloEpe`, so the same numbers come back every time.
paloEpePeo(peo)paloEpe gives different numbers every time. Sometimes that is what you want; sometimes you want to see the same thing — when teaching, when comparing two designs, or when testing your code.
paloEpePeo(99) sets the seed. From then on paloEpe and paloEpeGauss give the same sequence of numbers every time the sketch runs.
Each seed gives a different sequence. Change the seed and you get a different design; go back to the first seed and the first design comes back.
Note: this seed does not touch paloKelelo — that has its own seed, paloKeleloPeo.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
peo | palo | The number that fixes the sequence. The same seed gives the same numbers. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(400, 400);
bokamorago(240);
tlogelaMothalo();
paloEpePeo(7);
gopheta (diri i = 0; i < 60; i = i + 1) {
tlatsaMmala(paloEpe(60, 200), 90, 160);
thalaSediko(paloEpe(bophara), paloEpe(boleele), paloEpe(10, 40));
}
}tiro setaLoeto() {
thalaKanefase(400, 400);
bokamorago(240);
tlogelaMothalo();
// Letlhakore le le kwa molemeng — peo 1
paloEpePeo(1);
gopheta (diri i = 0; i < 40; i = i + 1) {
tlatsaMmala(40, 140, 200);
thalaSediko(paloEpe(0, 200), paloEpe(boleele), paloEpe(8, 30));
}
// Letlhakore le le kwa mojeng — peo 2
paloEpePeo(2);
gopheta (diri i = 0; i < 40; i = i + 1) {
tlatsaMmala(220, 90, 70);
thalaSediko(paloEpe(200, 400), paloEpe(boleele), paloEpe(8, 30));
}
}