$\text{Find a, b, c, and d}$
$\text{to so g(x) = a sin(b(x-cπ) +d}$

Locate a min and the adjacent max

Locate the midpoint of these points.
It is where the origin has been translated.

The center point will be (cπ,d).
It tells you about the translation.

The horizontal distance between 
the min and max is π/(2b)

The vertical distance between
the min and max is 2a.

Select new problem

f(x) = sin(x)
a = 1.8 (slider from -5 to 5, step 0.1)
b = 1.6 (slider from -5 to 5, step 0.1)
c = 0.3 (slider from -2 to 2, step 0.1)
d = 0 (slider from -5 to 5, step 0.1)
flable: "$ \scalebox{1.2}{f(x)=" + (LaTeX[f]) + "} $"
d1: Random[-10, 50] / 10
a1: Random[-30, 30] / 10
b1: Random[-16, 16] / 4
c1: Random[-10, 30] / 10
g(x) = a1 * sin(b1 * (x - c1 * π)) + d1
h(x) = a * sin(b * (x - c * π)) + d
Cpt: (c1 * π, g(c1 * π))
Hpt: ((0.5 + b1 * c1) * π / b1, g((0.5 + b1 * c1) * π / b1))
e: x = c1 * π
i: y = d1
Lpt: ((-0.5 + b1 * c1) * π / b1, g((-0.5 + b1 * c1) * π / b1))
C: (x(Lpt), y(Hpt))
hSeg = Segment(C, Hpt)
vSeg = Segment(C, Lpt)
A = (6.74, -1.3)
steps = 0 (slider from 0 to 6, step 1)
glabel: "$ \scalebox{1.2}{g(x)=" + (LaTeX[g]) + " $"