thalaSelee
→ ellipse()Draws an ellipse — a round shape that is not equal all round, like an egg.
thalaSelee(x, y, bophara, boleele)The first two arguments are the centre x and y. The next two are the width and height — and they may differ. That is exactly where thalaSelee parts company with thalaSediko: a circle is equal all the way round, and an ellipse is not.
Give it a width and height that are the same and you are back at a circle: thalaSelee(200, 200, 80, 80) draws what thalaSediko(200, 200, 80) draws. When you want a circle, thalaSediko is easier — you write one number instead of two.
The name comes from the egg. Setswana has no word of its own for ellipse; selee is the maths dictionary’s term, built on lee, “egg” — and it is how several South African languages describe the shape in the same table. It is a picture a learner can see: an ellipse is an egg shape.
seeloSaSediko controls how the four numbers are read — whether x and y are the centre (the default) or a corner.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
x | palo | Centre x coordinate. |
y | palo | Centre y coordinate. |
bophara | palo | Width of the ellipse. |
boleele | palo | Height of the ellipse. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(400, 400);
bokamorago(238);
tlogelaMothalo();
// bophara jo bogolo go boleele: se namaletse
tlatsaMmala(220, 120, 110);
thalaSelee(200, 120, 240, 100);
// boleele jo bogolo go bophara: se eme
tlatsaMmala(110, 170, 220);
thalaSelee(200, 290, 100, 140);
}tiro setaLoeto() {
thalaKanefase(400, 400);
bokamorago(24, 28, 44);
tlogelaMothalo();
// bophara bo a nna bogolo fa boleele bo sa fetoge — mo bogareng di a lekana,
// mme fa di lekana selee e nna sediko
gopheta (diri i = 0; i < 7; i = i + 1) {
metlha bophara_jwa_gone = 30 + i * 20;
tlatsaMmala(80 + i * 24, 200 - i * 14, 230 - i * 10);
thalaSelee(60 + i * 46, 200, bophara_jwa_gone, 150);
}
}