正弦函數的描點
Author: 藍邦偉  老師

正弦函數的描點

$ 鉛直平移 $

k = 0 (slider from -5 to 5, step 1)
ω = 1 (slider from 0.1 to 5, step 0.1)
A = 0.8 (slider from 0.1 to 5, step 0.1)
n = 42 (slider from 0 to 100, step 1)
f(x) = A * cos(ω * x) + k
m = 27 (slider from 1 to 36, step 1)
list1 = Sequence((t * 6.28 / m, f(t * 6.28 / m)), t, 0, n)
u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
T_1 = Corner(1)
T_4 = Corner(4)
T_2: (7.5 * Corner[1] + 2.5 * Corner[2]) / 10
T_3: (7.5 * Corner[4] + 2.5 * Corner[3]) / 10
多邊形1, t_1, t_2, t_3, t_4 = Polygon(T_1, T_2, T_3, T_4)
text6: "$ 間隔\frac{π}{" + (LaTeX[m]) + "} $"
text1: "$ 點數" + (LaTeX[n + 1]) + " $"
text2: "$ 振幅" + (LaTeX[A]) + "$"
text3: "$ 週期\frac{2π}{" + (LaTeX[ω]) + "} $"
text7: "$ f(x)=" + (LaTeX[A]) + "cos(" + (LaTeX[ω]) + "x) " + (LaTeX[If[k < 0, "-", "+"]]) + "" + (LaTeX[abs(k)]) + "$"