0

0

1

D = Point(xAxis)
A = Point(xAxis)
c = Ray(A, D)
a = OrthogonalLine(A, xAxis)
B = Point(c)
b = OrthogonalLine(B, xAxis)
C = Point(a)
xbottom = -9 (slider from -9 to 9, step 1)
xtop = 9 (slider from xbottom to 9, step 1)
gap = 1 (slider from 0.2 to 2, step 0.1)
n: (xtop - xbottom) / gap + 1
f(x) = (2 * x) - 3
inputs = Sequence(xbottom + (i * gap), i, 0, n)
outputs: f(inputs)
arrows = Sequence(Segment[(x(A), (y(C) * Element[inputs, i])), (x(B), (y(C) * Element[outputs, i]))], i, 0, n)
rightticks = Sequence(Segment[(x(B), (y(C) * Element[inputs, i])), (x(B) + 0.3, (y(C) * Element[inputs, i]))], i, 0, n)
leftticks = Sequence(Segment[(x(A), (y(C) * Element[inputs, i])), (x(A) - 0.3, (y(C) * Element[inputs, i]))], i, 0, n)
pairs = Sequence((Element[inputs, i], Element[outputs, i]), i, 1, n)