COORDENADAS DE UN PUNTO RESPECTO DE UN SISTEMA DE REFERENCIA

\mathcal{R'}=(O';\vec{x'};\vec{y'})

\mathcal{R}=(O;\vec{i};\vec{j})

A' = (2.96, 1.3)
B' = (2.42, 1.8)
O' = (2, 1)
x' = Vector(O', A')
c = Line(O', x')
y' = Vector(O', B')
mody': (x(y')^(2) + y(y')^(2))^(0.5)
d = Line(B', y')
P = (5, 3)
f = Line(P, c)
P2' = Intersect(f, d)
β = Angle(P2', O', B')
v = Vector(O', P2')
modv: (x(v)^(2) + y(v)^(2))^(0.5)
e = Line(P, y')
modx': (x(x')^(2) + y(x')^(2))^(0.5)
P1' = Intersect(c, e)
α = Angle(P1', O', A')
u = Vector(O', P1')
modu: (x(u)^(2) + y(u)^(2))^(0.5)
x'dP = If(α ≟ 180°, -(modu / modx'), modu / modx')
y'dP = If(β ≟ 180°, -(modv / mody'), modv / mody')
xdP: x(P)
ydP: y(P)
A = Intersect(xAxis, yAxis)
B = Point(xAxis)
i = Vector(A, B)
C = Point(yAxis)
j = Vector(A, C)
texto3: "P=(" + (LaTeX[xdP]) + "," + (LaTeX[ydP]) + ")_{\mathcal{R}}"
texto2: "P=(" + (LaTeX[x'dP]) + "," + (LaTeX[y'dP]) + ")_{\mathcal{R'}}"