thalaBezier
→ bezier()Draws a Bézier curve from four points — two ends and two control points.
thalaBezier(x1, y1, x2, y2, x3, y3, x4, y4)thalaBezier(x1, y1, x2, y2, x3, y3, x4, y4) draws a curve between two end points, pulled about by two control points the line never reaches.
The first two numbers are the point the line starts at. The next four are the control points — they pull the line towards them, and the line does not touch them. The last two are the point the line ends at.
The Bézier name is not translated. Pierre Bézier was a person — a car engineer in France — and people’s names are not translated. It is the same rule that leaves paloEpeGauss as it is.
The gentler curve is thalaKonego, which passes through every point you give it instead of merely being pulled by them.
⚠ With both the stroke and the fill turned off, nothing happens at all — thalaBezier simply falls silent rather than throwing. Measured.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
x1 | palo | x of the first anchor point. |
y1 | palo | y of the first anchor point. |
x2 | palo | x of the first control point. |
y2 | palo | y of the first control point. |
x3 | palo | x of the second control point. |
y3 | palo | y of the second control point. |
x4 | palo | x of the second anchor point. |
y4 | palo | y of the second anchor point. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(400, 260);
bokamorago(245);
// Mothalo o o bontshang kwa dintlha tsa taolo di leng teng
mothaloMmala(200, 200, 200);
boketeMothalo(1);
thalaMothalo(60, 200, 120, 40);
thalaMothalo(340, 200, 280, 40);
tlogelaGoTlatsa();
mothaloMmala(30, 90, 170);
boketeMothalo(4);
thalaBezier(60, 200, 120, 40, 280, 40, 340, 200);
tlogelaMothalo();
tlatsaMmala(220, 70, 90);
thalaNtlha(120, 40);
thalaNtlha(280, 40);
tlhalosa('Konego ya botala jwa loapi e e menaganeng, le mela e mebedi e e bofefo e e supang dintlha tsa taolo tse dikhibidu tse konego e sa di kgomeng.');
}See also
Section titled “See also”ntlhanaBezier, magarengBezier, mothalokgomiBezier, thalaKonego