paloKelelo
→ noise()Returns an unpredictable number that changes gently, without jumping.
paloKelelo(x, y, z)Call paloEpe twice and the two numbers have nothing to do with each other — they jump. paloKelelo flows: give it points that are close together and it returns numbers that are close together.
That is what lets you draw a line that rolls like a hill or a river — unpredictable, yet unbroken.
The value returned is always between 0 and 1.
The number you pass is a place in noise space, not a time. Move in small steps (i * 0.01) and the flow is smooth; move in large steps (i * 0.5) and it turns rough, until it behaves like paloEpe.
You may pass one number, two, or three. Two are used for a surface; one for a line.
Note: the name means flow, not sound. paloKelelo has nothing to do with noise you can hear — it is an unpredictable number that changes gently.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
x | palo | The first place in noise space. |
y (optional) | palo | The second place, when drawing a surface. |
z (optional) | palo | The third place. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(400, 400);
bokamorago(210, 228, 240);
tlogelaMothalo();
paloKeleloPeo(4);
tlatsaMmala(70, 110, 90);
gopheta (diri x = 0; x < 400; x = x + 1) {
diri godimo = lekanyetsa(paloKelelo(x * 0.008), 0, 1, 120, 300);
thalaKhutlonne(x, godimo, 1, 400 - godimo);
}
}tiro setaLoeto() {
thalaKanefase(400, 400);
bokamorago(245);
tlogelaMothalo();
paloEpePeo(5);
paloKeleloPeo(5);
// Kwa godimo: `paloEpe` — e a tlolela
tlatsaMmala(220, 90, 70);
gopheta (diri x = 0; x < 400; x = x + 2) {
diri y = lekanyetsa(paloEpe(), 0, 1, 20, 180);
thalaSediko(x, y, 4);
}
// Kwa tlase: `paloKelelo` — e a elela
tlatsaMmala(40, 140, 200);
gopheta (diri x = 0; x < 400; x = x + 2) {
diri y = lekanyetsa(paloKelelo(x * 0.01), 0, 1, 220, 380);
thalaSediko(x, y, 4);
}
}