Overflowing rectangles

Pour!

A = (0, 4)
C = (12, 11)
a = OrthogonalLine(C, xAxis)
b = OrthogonalLine(C, yAxis)
c = OrthogonalLine(A, xAxis)
d = OrthogonalLine(A, yAxis)
B = Intersect(b, c)
D = Intersect(a, d)
tgtRectangle, tgt_w, d_1, c_1, tgt_h = Polygon(A, D, C, B)
E = Intersect(xAxis, yAxis)
F = Point(Circle[E, tgt_w])
e = Segment(E, F)
G = Point(Circle[F, tgt_h])
f = Segment(F, G)
H = Point(Circle[G, c_1])
g = Segment(G, H)
I = Point(Circle[H, d_1])
h = Segment(H, I)
J = (18, 4)
tgtPerim: (2 * (tgt_w + tgt_h))
k = Circle(J, tgtPerim / 2)
j = Line(J, xAxis)
K = Intersect(k, j, 2)
l = Segment(J, K)
L = Point(l)
p = Circle(L, K)
m = OrthogonalLine(L, l)
M = Intersect(p, m, 2)
n = OrthogonalLine(M, yAxis)
q = OrthogonalLine(J, l)
N = Intersect(n, q)
PouringRectangle, j_1, l_1, m_1, n_1 = Polygon(J, L, M, N)
newAreaHeight: Area[PouringRectangle] / tgt_w
r = Circle(D, newAreaHeight)
P, Q = Intersect(r, a)
s = OrthogonalLine(Q, a)
R = Intersect(c, s)
t_1 = Segment(R, Q)
pouredAreaRectangle, a_2, d_2, q_1, r_1 = Polygon(A, D, Q, R)
i: x(D) + t_1
t = 0 (slider from 0 to 1, step 0.01)
u = Vector(D, Q)
waterT: (x(D), y(D)) + (t * u)
v = Vector(J, N)
waterS: (x(N), y(N)) - (t * v)
f_1 = Line(waterS, m_1)
T = Intersect(f_1, l_1)
g_1 = Line(waterT, tgt_w)
O = Intersect(g_1, r_1)
poly1, a_1, d_3, watert, o = Polygon(A, D, waterT, O)
poly2, j_2, l_2, t_2, waters = Polygon(J, L, T, waterS)
V: (x(waterT) + 2, y(waterT) - 1)
S = Midpoint(l)
w = Random(x(J), x(K))