Author: Enric Brasó

Perfecte !!

Varia els paràmetres m, b de la recta blava, 
per tal de trasformar-la en la vermella

Varia el pendent m

Varia l'ordenada a l'origen b

y = m x + b

Recta a descobrir

Ordenada a l'origen

m = -2.5999999999999996 (slider from -5 to 5, step 0.2)
b = 4.5 (slider from -10 to 10, step 0.5)
f(x) = m x + b
b_1: round(32 random()) / 2 - 4
m_1: round(25 random()) / 5 - 2.4
g(x) = m_1 x + b_1
A = Point(g)
T5: " y =  " + m + " x + (" + b + ")"
B = Intersect(f, yAxis)
C = Point(f)
v = (1, 0)
D = Translate(C, v)
u = Vector(C, D)
d = OrthogonalLine(D, xAxis)
J = Intersect(f, d)
poly1, j, c, d_1 = Polygon(C, D, J)