Pantalla radar

Escenario

Cuadrícula

Albatros

Buitre

B_1

← Velocidad

← Eslora

← Pendiente recta

← Ecuación recta

← Ordenada origen

← Distancia a C

← Punto corte (C)

← Tiempo a C (proa)

← Tiempo en pasar

← Tiempo a C (popa)

← Intervalo peligro

← Tiempo a C (centro)

← Instante colisión

← Posición inicial

← Al cabo de 1 min

radar = true
escena = false
cuadros = false
eA = 150 (slider from 10 to 150, step 1)
texto2: "Eslora = " + eA + " m"
eB = 100 (slider from 10 to 150, step 1)
texto4: "Eslora = " + eB + " m"
t = 0 (slider from 0 to 10, step 0.01)
Ay = 200 (slider from 100 to 1200, step 25)
Ax = 800 (slider from 100 to 1200, step 25)
By = 350 (slider from 100 to 1200, step 25)
Bx = 300 (slider from 100 to 1200, step 25)
C0 = (-300, 975)
c = OrthogonalLine(C0, xAxis)
d = OrthogonalLine(C0, c)
Zcenit = Point(c)
e = Circle(C0, Zcenit)
Zang00 = Intersect(e, d, 1)
Zangmin = Rotate(Zcenit, 285°, C0)
f = CircleArc(C0, Zangmin, Zcenit)
Z = Point(f)
tGiro = 1
Zang0 = Intersect(e, d, 2)
α = Angle(Zang00, C0, Z)
B_2: (Bx, By)
B_1 = Point(Segment[(0, 0), (0, 1000)])
B'_1: ((y(B_1) * cos(α)), (y(B_1) * sin(α)))
b = Ray(B_1, B_2)
v = Vector(B_1, B_2)
B0: B_1 + (t * v)
Bb14: B_1 - (UnitVector[v] * eB / 2)
Bb13: B_1 + (UnitVector[v] * eB / 2)
A_2: (Ax, Ay)
A_1 = Point(Segment[(200, 0), (1200, 0)])
a = Ray(A_1, A_2)
C = Intersect(b, a)
v4 = Vector(Bb14, C)
tB4: x(v4 / v)
v3 = Vector(Bb13, C)
tB3: x(v3 / v)
v1 = Vector(B_1, C)
tB: x(v1 / v)
u = Vector(A_1, A_2)
Aa14: A_1 - (UnitVector[u] * eA / 2)
u4 = Vector(Aa14, C)
tA4: x(u4 / u)
Aa13: A_1 + (UnitVector[u] * eA / 2)
u3 = Vector(Aa13, C)
tA3: x(u3 / u)
tImpacto = If(tB3 ≤ tA3 ∧ tA3 ≤ tB4, tA3, If[tA3 ≤ tB3 ∧ tB3 ≤ tA4, tB3, 1000])
B = If(t < tImpacto, B0, B_1 + (tImpacto * v))
B': (x(B) + (y(B) * cos(α)), (y(B) * sin(α)))
uB = Vector(B'_1, B')
wB = Vector(B', B' - (0, 200))
βB3 = Angle(wB, uB)
Bb4_1: B - (UnitVector[v] * eB / 2)
B4': (x(Bb4_1) + (y(Bb4_1) * cos(α)), (y(Bb4_1) * sin(α)))
B4Proa = Rotate(B4', ((-βB3) * If[t - tImpacto < tGiro, t - tImpacto, 1]), B')
B4Popa = Rotate(B4', ((180° - βB3) * If[t - tImpacto < tGiro, t - tImpacto, 1]), B')
B4'' = If(tB < tImpacto, B4Popa, B4Proa)
B4''': B4'' + ((t - tImpacto - tGiro) * wB)
BB4Proa = If(t < tImpacto, B4', If[t - tImpacto < tGiro, B4'', If[y(B4') - y(B4''') < 200 - eB / 2, B4''', B' - (0, 200 - eB / 2)]])
Bb3_1: B + (UnitVector[v] * eB / 2)
B3': (x(Bb3_1) + (y(Bb3_1) * cos(α)), (y(Bb3_1) * sin(α)))
B3Proa = Rotate(B3', ((-βB3) * If[t - tImpacto < tGiro, t - tImpacto, 1]), B')
B3Popa = Rotate(B3', ((180° - βB3) * If[t - tImpacto < tGiro, t - tImpacto, 1]), B')
B3'' = If(tB < tImpacto, B3Popa, B3Proa)
B3''': B3'' + ((t - tImpacto - tGiro) * wB)
BB4Popa = If(t < tImpacto, B4', If[t - tImpacto < tGiro, B4'', If[y(B') - y(B4''') < 200, B4''', B' - (0, 200)]])
BB3Proa = If(t < tImpacto, B3', If[t - tImpacto < tGiro, B3'', If[y(B3') - y(B3''') < 200, B3''', B' - (0, 200)]])
BB3Popa = If(t < tImpacto, B3', If[t - tImpacto < tGiro, B3'', If[y(B') - y(B3''') < 200 - eB / 2, B3''', B' - (0, 200 - eB / 2)]])
B5': B4' + (0, 40)
B5Popa = Rotate(B5', ((180° - βB3) * If[t - tImpacto < tGiro, t - tImpacto, 1]), B')
B5Proa = Rotate(B5', ((-βB3) * If[t - tImpacto < tGiro, t - tImpacto, 1]), B')
B5'' = If(tB < tImpacto, B5Popa, B5Proa)
B5''': B5'' + ((t - tImpacto - tGiro) * wB)
BB5Popa = If(t < tImpacto, B5', If[t - tImpacto < tGiro, B5'', If[y(B5') - y(B5''') < 200, B5''', B' - (40, 200)]])
BB5Proa = If(t < tImpacto, B5', If[t - tImpacto < tGiro, B5'', If[y(B5') - y(B5''') < 200 - eB / 2, B5''', B' - (-40, 200 - eB / 2)]])
A0: A_1 + (t * u)
A = If(t < tImpacto, A0, A_1 + (tImpacto * u))
Aa4_1: A - (UnitVector[u] * eA / 2)
Aa3_1: A + (UnitVector[u] * eA / 2)
g = CircleSector(C0, Zcenit, Zang0)
list1 = Sequence(Segment[(0, s), (1200, s)], s, 100, 1200, 100)
list2 = Sequence(Segment[(s, 0), (s, 1200)], s, 100, 1200, 100)
A': (x(A) + (y(A) * cos(α)), (y(A) * sin(α)))
h = Ray(B'_1, B')
C': (x(C) + (y(C) * cos(α)), (y(C) * sin(α)))
j = Segment(B'_1, C')
Bb04: B0 - (UnitVector[v] * eB / 2)
Bb03: B0 + (UnitVector[v] * eB / 2)
Aa04: A0 - (UnitVector[u] * eA / 2)
Aa03: A0 + (UnitVector[u] * eA / 2)
m = Segment(Bb3_1, Bb4_1)
n = Segment(Aa3_1, Aa4_1)
D = Intersect(m, n)
A3': (x(Aa3_1) + (y(Aa3_1) * cos(α)), (y(Aa3_1) * sin(α)))
A4': (x(Aa4_1) + (y(Aa4_1) * cos(α)), (y(Aa4_1) * sin(α)))
A5': A4' + (0, 40)
wA = Vector(A', A' - (0, 200))
u1 = Vector(A_1, C)
uA = Vector(A_1, A')
tA: x(u1 / u)
βA3 = Angle(wA, uA)
A3'': A3' + ((t - tImpacto) * wB)
A4'': A4' + ((t - tImpacto) * wB)
Aa3 = If(t < tImpacto, A3', If[y(A3') - y(A3'') < 200, A3'', A3' - (0, 200)])
Aa4 = If(t < tImpacto, A4', If[y(A4') - y(A4'') < 200, A4'', A4' - (0, 200)])
A5'': A5' + ((t - tImpacto) * wB)
Aa5 = If(t < tImpacto, A5', If[y(A5') - y(A5'') < 200, A5'', A5' - (0, 200)])
Bb3 = If(tB < tImpacto, BB3Popa, BB3Proa)
Bb4 = If(tB < tImpacto, BB4Popa, BB4Proa)
Bb5 = If(tB < tImpacto, BB5Popa, BB5Proa)
E = (0, 0)
F: ((1200 * cos(α)), (1200 * sin(α)))
G = (1200, 0)
H: G + F - E
p1, p11, p12, p13, p14 = Polygon(E, F, H, G)
p2, p21, p22, p23, p24 = Polygon(E, G, G - (0, 200), E - (0, 200))
p3, p33, p34, p31, p32 = Polygon(G, H, H - (0, 200), G - (0, 200))
list5 = Sequence(CircleArc[(0, 0), (((100 * k) * cos(α)), ((100 * k) * sin(α))), (0, (100 * k))], k, 1, 12)
B'_2: (x(B_2) + (y(B_2) * cos(α)), (y(B_2) * sin(α)))
A'_2: (x(A_2) + (y(A_2) * cos(α)), (y(A_2) * sin(α)))
l = Segment(A_1, C')
list3 = Sequence(Segment[((s * cos(α)), (s * sin(α))), ((s * cos(α)) + 1200, (s * sin(α)))], s, 0, 1200, 100)
list4 = Sequence(Segment[(s, 0), (s + (1200 * cos(α)), (1200 * sin(α)))], s, 0, 1200, 100)
A'_1: A_1
i = Segment(C0, Z)
texto5: "" + t + "'"
texto6: "" + eA + " m"
A1: "" + eA + " m"
B1: "" + eB + " m"
B4: "" + (abs(v)) + " m/min"
m_B: (y(B_2) - y(B_1)) / (x(B_2) - x(B_1))
m_A: (y(A_2) - y(A_1)) / (x(A_2) - x(A_1))
texto7: "" + m_A
A5: "" + m_A
B5: "" + m_B
B6 = If(x(B_1) ≟ x(B_2), "no hay", "" + (y(B_1) - (m_B * x(B_1))))
A6 = If(x(A_1) ≟ x(A_2), "no hay", "" + (y(A_1) - (m_A * x(A_1))))
A7: "" + a
B7: "" + b
A4: "" + (abs(u)) + " m/min"
B6_1: C
dAC = Distance(A_1, C)
dBC = Distance(B_1, C)
A9: "" + dAC + " m"
B9: "" + dBC + " m"
tAC: dAC / abs(u)
tBC: dBC / abs(v)
A10: "" + tAC + " min"
B10: "" + tBC + " min"
B11: "" + (eB / abs(v)) + " min"
A11: "" + (eA / abs(u)) + " min"
A13: "" + (tAC + eA / ((2 * abs(u)))) + " min"
B12: "" + (tBC - eB / ((2 * abs(v)))) + " min"
B13: "" + (tBC + eB / ((2 * abs(v)))) + " min"
A12: "" + (tAC - eA / ((2 * abs(u)))) + " min"
texto8: "[" + (tAC - eA / ((2 * abs(u)))) + ", " + (tAC + eA / ((2 * abs(u)))) + "]"
A14: "[" + (tAC - eA / ((2 * abs(u)))) + ", " + (tAC + eA / ((2 * abs(u)))) + "]"
B14: "[" + (tBC - eB / ((2 * abs(v)))) + ", " + (tBC + eB / ((2 * abs(v)))) + "]"
B15 = If(tB3 ≤ tA3 ∧ tA3 ≤ tB4, "" + tA3 + " min", If[tA3 ≤ tB3 ∧ tB3 ≤ tA4, "" + tB3 + " min", "no chocan"])
hayImpacto = If(tB3 ≤ tA3 ∧ tA3 ≤ tB4, true, If[tA3 ≤ tB3 ∧ tB3 ≤ tA4, true, false])
A2: "" + A_1
A3: "" + A_2
B2: "" + B_1
B3: "" + B_2
B8: C