三角函數的描點
Author: 藍邦偉  老師

間隔 \frac{ π }{ m} 

點數n+1

振幅

週期 \frac{ 2π }{p } 

縱向平移

正弦函數的描點

k = 2 (slider from -5 to 5, step 1)
p = 1.5 (slider from 0.1 to 5, step 0.1)
a = 1.1 (slider from 0.1 to 5, step 1)
n = 59 (slider from 0 to 100, step 1)
f(x) = a * sin(p * x) + k
m = 28 (slider from 1 to 36, step 1)
list1 = Sequence((t * 6.28 / m, f(t * 6.28 / m)), t, 0.0, n)
u = Vector((x(Corner[1.0]), 0.0), (x(Corner[3.0]), 0.0))
v = Vector((0.0, y(Corner[1.0])), (0.0, y(Corner[3.0])))
text6: "y=" + a + "sin(" + p + "x)" + (If[k < 0.0, "-", "+"]) + (abs(k))
T_1 = Corner(1.0)
T_4 = Corner(4.0)
T_2: (7.0 * Corner[1.0] + 3.0 * Corner[2.0]) / 10.0
T_3: (7.0 * Corner[4.0] + 3.0 * Corner[3.0]) / 10.0
多邊形1, t_1, t_2, t_3, t_4 = Polygon(T_1, T_2, T_3, T_4)