4

5

6

7

10

13

7493

A

B

Q_0

Q_1

Q_2

Q_3

GND

U_S

R_{01}

R_{02}

2^3

2^2

2^1

2^0

vx = (0.5, 0)
vy = (0, -0.5)
A = (0.75, 1)
Vieleck1, a, b, c, d = Polygon(A, A + vy, A + vy + vx, A + vx)
B = (1.5, 1)
C = (2.25, 1)
D = (3, 1)
E = (3.75, 1)
F = (4.5, 1)
G = (5.25, 1)
e, f, g, h = pin(vx, vy, B)
i, j, k, l = pin(vx, vy, C)
m, n, p, q = pin(vx, vy, D)
r, s, t_3, a_1 = pin(vx, vy, E)
b_1, c_1, d_1, e_1 = pin(vx, vy, F)
f_1, g_1, h_1, i_1 = pin(vx, vy, G)
H = (0.5, 1)
I = (6, 1)
J = (6, 3)
K = (0.5, 3)
Vieleck2, h_2, i_2, j_1, k_1 = Polygon(H, I, J, K)
L = (0.75, 3.5)
M = (1.5, 3.5)
N = (2.25, 3.5)
O = (3, 3.5)
P = (3.75, 3.5)
Q = (4.5, 3.5)
R = (5.25, 3.5)
l_1, m_1, n_1, p_1 = pin(vx, vy, L)
q_1, r_1, s_1, t_1 = pin(vx, vy, M)
a_2, b_2, c_2, d_2 = pin(vx, vy, N)
e_2, f_2, g_2, j_2 = pin(vx, vy, O)
k_2, l_2, m_2, n_2 = pin(vy, vx, P)
p_2, q_2, r_2, s_2 = pin(vx, vy, Q)
t_2, a_3, b_3, c_3 = pin(vx, vy, R)
S = Point(k_1)
T = Point(k_1)
d_3 = Semicircle(S, T)
clock = 0 (slider from 0 to 100, step 1)
tta: Mod[clock, 2.0] > 0.0
tq0: Mod[clock, 4.0] > 1.0
e_3 = Segment((2.5, 3.5), (2.5, 3.75))
f_3 = Segment((2.5, 3.75), (0.25, 3.75))
g_3 = Segment((0.25, 3.75), (0.25, 0.25))
h_3 = Segment((0.25, 0.25), (1.0, 0.25))
i_3 = Segment((1.0, 0.25), (1.0, 0.5))
tq1: Mod[clock, 8.0] > 3.0
tq2: Mod[clock, 16.0] > 7.0
tq3: Mod[clock, 32.0] > 15.0
U = (8.5, 3.5)
V = (8, 3.5)
W = (7.5, 3.5)
Z = (7, 3.5)
vxx = (0.5, 0)
vyy = (0, -1)
Vieleck3 = LED(Z, vxx, vyy)
Vieleck4 = LED(W, vxx, vyy)
Vieleck5 = LED(V, vxx, vyy)
Vieleck6 = LED(U, vxx, vyy)
l_3 = Segment((4.75, 3.5), (4.75, 4.25))
m_3 = Segment((4.75, 4.25), (8.125, 4.25))
n_3 = Segment((8.125, 4.25), (8.125, 3.5))
k_3 = Segment((8.625, 3.75), (8.625, 3.5))
j_3 = Segment((2.5, 3.75), (8.625, 3.75))
A_1 = Intersect(j_3, e_3)
q_3 = Segment((5.5, 3.5), (5.5, 4.0))
r_3 = Segment((5.5, 4.0), (7.625, 4.0))
s_3 = Segment((7.625, 4.0), (7.625, 3.5))
b_4 = Segment((3.25, 4.5), (7.125, 4.5))
a_4 = Segment((3.25, 3.5), (3.25, 4.5))
c_4 = Segment((7.125, 4.5), (7.125, 3.5))
p_3 = Vector((1.0, 4.5), (1.0, 3.5))

Tool: pin
Input: vx, vy, A
Output: a, b, c, d

Vieleck1, a, b, c, d = Polygon(A, A + vy, A + vy + vx, A + vx)

Tool: NandKLein
Input: vx, vy, U, A
Output: p_3, e_3, f_3, g_3, h_3, i_3, j_3, k_3, l_3, m_3, n_3

Vieleck1, a, b, c, d = Polygon(A, A + vy, A + vy + vx, A + vx)
U = Point(d)
e_3 = Segment(U, U - 1.5 * vy)
f_3 = Segment(U - 1.5 * vy, U - 1.5 * vy + 2.0 * vx)
g_3 = Segment(U + 1.5 * vx, U + 1.5 * vx - vy)
h_3 = Segment(U + 1.5 * vx - vy, U + 2.0 * vx - vy)
Vieleck3, i_3, j_3, k_3, l_3 = Polygon(U + 2.0 * vx - 1.75 * vy, U + 2.5 * vx - 1.75 * vy, U + 2.5 * vx - 0.75 * vy, U + 2.0 * vx - 0.75 * vy)
p_3 = Circle(U + 2.55 * vx - 1.25 * vy, 0.05)
m_3 = Segment(U + 2.6 * vx - 1.25 * vy, U + 3.0 * vx - 1.25 * vy)
n_3 = Segment(U + 3.0 * vx - 1.25 * vy, U + 3.0 * vx)

Tool: NandKlein2
Input: vx, vy, M, W
Output: q_4, h_4, j_4, i_4, l_4, k_4, m_4, n_4, p_4, r_4, s_4

q_1, r_1, s_1, t_1 = pin(vx, vy, M)
h_4 = Segment(W, W + 1.5 * vy)
i_4 = Segment(W + 1.5 * vy, W + 1.5 * vy + 2.0 * vx)
j_4 = Segment(W + 1.5 * vx, W + 1.5 * vx + vy)
k_4 = Segment(W + 1.5 * vx + vy, W + 2.0 * vx + vy)
Vieleck4, l_4, m_4, n_4, p_4 = Polygon(W + 2.0 * vx + 0.75 * vy, W + 2.0 * vx + 1.75 * vy, W + 2.5 * vx + 1.75 * vy, W + 2.5 * vx + 0.75 * vy)
q_4 = Circle(W + 2.55 * vx + 1.25 * vy, 0.05)
r_4 = Segment(W + 2.6 * vx + 1.25 * vy, W + 3.0 * vx + 1.25 * vy)
s_4 = Segment(W + 3.0 * vx + 1.25 * vy, W + 3.0 * vx)

Tool: LED
Input: A, gatx, gaty
Output: Vieleck1

Vieleck1, a, b, c, d = Polygon(A, A + 0.5 * gatx, A + 0.5 * gatx + 0.5 * gaty, A + 0.5 * gaty)