This shows you the differences between two versions of the page.
nl:sin [2016/01/01 22:47] |
nl:sin [2020/02/28 10:46] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Sin ===== | ||
+ | ==== Formaat ==== | ||
+ | **sin** ( // | ||
+ | ==== Beschrijving ==== | ||
+ | Dit is een wiskundige formule, meer bepaald uit de [[http:// | ||
+ | De functie berekent de sinus van // | ||
+ | |||
+ | Meer informatie over deze functie vind je op de wiki : [[http:// | ||
+ | ==== Voorbeeld ==== | ||
+ | <code basic4gl> | ||
+ | clg | ||
+ | color black | ||
+ | # tekent de horizontale as | ||
+ | line 0, | ||
+ | line 150, | ||
+ | # we starten hier | ||
+ | color blue | ||
+ | lastx = 0 | ||
+ | lasty = sin(0) * 50 + 150 | ||
+ | # teken nu de sinusoïdale | ||
+ | for x = 0 to 300 step 5 | ||
+ | angle = x / 300 * 2 * pi | ||
+ | y = sin(angle) * 50 + 150 | ||
+ | line lastx, lasty,x, y | ||
+ | lastx = x | ||
+ | lasty = y | ||
+ | next x | ||
+ | </ | ||
+ | |||
+ | ++++geeft dan :| | ||
+ | {{: | ||
+ | ++++ | ||
+ | |||
+ | ==== Zie ook ==== | ||
+ | [[acos|Acos]], | ||
+ | |||
+ | ---- | ||
+ | [[rand|vorige]] | [[mathematical|Wiskundige Functies]] | [[sqr|volgende]] |