@interact
def sinusoid(A = 1, B = 1, C = 0, D = 0):
f(x) = sin(x)
g(x) = A*f(B*x - C) + D
show(plot(f, 0, 2*pi, color = 'black', linestyle = '--')+plot(g, C/B, C/B+2*pi/B))
print f(x), '--->', g(x)
|
|
Click to the left again to hide and once more to show the dynamic interactive window
|