\vec{n}

Ver ecuación general

He creado una herramienta para pintar la ecuación general 
pero fallaba para rectas horizontales y lo he parcheado con un texto 
llamado excepcion

\vec {d}

Ver producto escalar

B = (2, -5)
O = (0, 0)
n = Vector(O, B)
P = (2, 6)
xn = If(x(n) > 0, "+ " + (x(n)) + "t", If[x(n) < 0, " " + (x(n)) + "t", ""])
yn = If(y(n) > 0, "+ " + (y(n)) + "  t", If[y(n) < 0, " " + (y(n)) + "  t", ""])
yP = If(y(P) > 0, "- " + (y(P)), If[y(P) < 0, "+ " + ((-y(P))), ""])
xP = If(x(P) > 0, "- " + (x(P)), If[x(P) < 0, "+ " + ((-x(P))), ""])
e = true
excepcion = If(y(P) ≟ 0, "y = 0", y(P) < 0, "y + " + ((-y(P))) + " = 0", "y - " + (y(P)) + " = 0")
r = OrthogonalLine(P, n)
coefs2: {x(r), y(r), z(r)}
mcd2 = If(x(r) ≟ 0 ∨ floor(x(r)) ≠ x(r) ∨ floor(y(r)) ≠ y(r) ∨ floor(z(r)) ≠ z(r), x(r), (sgn(x(r)) * GCD[coefs2]))
a2: x(r) / mcd2
b2: y(r) / mcd2
c2: z(r) / mcd2
tx2 = If(a2 ≟ 1, "x", a2 + " x")
ty2 = If(b2 ≟ 1, " + y", b2 ≟ -1, " - y", b2 ≟ 0, "", b2 > 0, " + " + b2 + " y", b2 < 0, " - " + ((-b2)) + " y")
tz2 = If(c2 ≟ 0, " = 0", c2 > 0, " + " + c2 + " = 0", " - " + ((-c2)) + " = 0")
texto8: "" + (tx2 + ty2 + tz2) + ""
Q = Point(r)
d = Vector(P, Q)
texto3: "\vec {n}·\vec {d}=(" + (LaTeX[x(n)]) + "," + (LaTeX[y(n)]) + ")·(" + (LaTeX[x(d)]) + "," + (LaTeX[y(d)]) + ")=" + (LaTeX[(n * d)]) + ""
a = false

Tool: EcGeneral
recta
Input: r
Output: gene

coefs: {x(r), y(r), z(r)}
mcd = If(x(r) ≟ 0 ∨ floor(x(r)) ≠ x(r) ∨ floor(y(r)) ≠ y(r) ∨ floor(z(r)) ≠ z(r), x(r), (sgn(x(r)) * GCD[coefs]))
a: x(r) / mcd
b: y(r) / mcd
c: z(r) / mcd
tx = If(a ≟ 1, "x", a + " x")
ty = If(b ≟ 1, " + y", b ≟ -1, " - y", b ≟ 0, "", b > 0, " + " + b + " y", b < 0, " - " + ((-b)) + " y")
tz = If(c ≟ 0, " = 0", c > 0, " + " + c + " = 0", " - " + ((-c)) + " = 0")
gene: "" + (tx + ty + tz) + ""