Skip to content
ExamplesOpen editor ↗

thalaKonego

→ spline()

Draws a smooth curve that passes through the points you give it.

thalaKonego(x1, y1, x2, y2, x3, y3, x4, y4)

thalaKonego(x1, y1, x2, y2, x3, y3, x4, y4) gives a smooth curve that passes through all four points, in order. That is what separates it from thalaBezier, whose control points only pull at the line without touching it.

The name comes from the river. Konega is the word used when a river bends: “e konega kwa bokone botlhaba” — it curves to the north-east. It is the Setswana word for a curve.

What the end points do can be changed. Under seeloSaKonego('ends', AKARETSA) — the default — the curve passes through all four. Under PEELOTHOKO, the first and last points only steer, and are not drawn.

⚠ With both the stroke and the fill turned off, nothing happens at all — as with thalaBezier.

NameTypeDescription
x1palox of the first point.
y1paloy of the first point.
x2palox of the second point.
y2paloy of the second point.
x3palox of the third point.
y3paloy of the third point.
x4palox of the fourth point.
y4paloy of the fourth point.
A curve through every point
tiro setaLoeto() {
  thalaKanefase(400, 240);
  bokamorago(245);

  tlogelaGoTlatsa();
  mothaloMmala(30, 130, 90);
  boketeMothalo(4);
  thalaKonego(40, 180, 120, 60, 260, 190, 360, 70);

  tlogelaMothalo();
  tlatsaMmala(220, 70, 90);
  thalaSediko(40, 180, 10);
  thalaSediko(120, 60, 10);
  thalaSediko(260, 190, 10);
  thalaSediko(360, 70, 10);

  tlhalosa('Konego e talatala e e menaganeng e e fetang mo didikong tse dinnye tse dikhibidu tse nne.');
}

ntlhanaKonego, magarengKonego, mothalokgomiKonego, seeloSaKonego, thalaBezier