對數函數的平移
Author: 藍邦偉  老師

拉動h決定左右平移量，拉動k決定上下平移量，拉動n決定平移的情形

x

y

對數函數的平移

上下平移

左右平移

$ y=log_2x $

a = 0 (slider from 0 to 8, step 0.01)
f(x) = ld(x)
h = -1 (slider from -5 to 5, step 1)
A = Corner(1)
B = Corner(3)
C: (x(A), 0)
D: (x(B), 0)
u = Vector(C, D)
E: (0, y(A))
F: (0, y(B))
v = Vector(E, F)
g(x) = f(x - h)
k = 1 (slider from -5 to 5, step 1)
G: (a, f(a))
c = Line(G, u)
H = Intersect(g, c, (0.27999999782045903, 0.3561438077687027))
d = Segment(G, H)
g_2(x) = f(x) + k
e = Line(G, v)
I = Intersect(g_2, e, (1.28, 1.3561438102252754))
i = Segment(G, I)
f_5(x) = ld(x - h) + k
l = Line(I, u)
J = Intersect(f_5, l, (0.27999999782045926, 1.356143807768703))
m = Line(J, v)
n_1 = Segment(I, J)
p = Segment(J, H)
n = 0 (slider from 0 to 3, step 1)
text2: "y=log_2(x" + (If[h < 0, "+", "-"]) + (abs(h)) + ")"
text3: "y=log_2x" + (If[k < 0, "-", "+"]) + (abs(k))
text4: "y=log_2(x" + (If[h < 0, "+", "-"]) + (abs(h)) + ")" + (If[k < 0, "-", "+"]) + (abs(k))
Q_2: 0.25 * Corner[2] + 0.75 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
poly1, b, q_2, q_3, j = Polygon(Corner[1], Q_2, Q_3, Corner[4])
q = Segment(Q_2, Q_3)

Tool: 2D-AXIS (command 工具1)
2D-Axis
Input: A, B, C, D, E, F
Output: u, v

x

y

C: (x(A), 0)
D: (x(B), 0)
u = Vector(C, D)
E: (0, y(A))
v = Vector(E, F)