Väikseid maju

Keskmisi maju

Suuri maju

Aseta majad 3D vaates nii, et ette antud numbri sihist 
vaadates oleks näha täpselt nii mitu maja, kui suur 
arv on tabeli servale kirjutatud.

1

3

2

1

3

2

Maja 3D vaates põhiruudustikule liigutamiseks vali majade 
grupis samas reas või veerus asuv maja ja lohista seda 
põhiruudustikule punktist, mis on maja põhjatahul.

Pane tähele, et ette on antud, kui mitut väikest, 
keskmist ja suurt maja kasutada tohib.

A = Point(yAxis)
B = (-3, -1)
C = (-3, -4)
D = Point(yAxis)
q1, a_{8}, b_{8}, c_{8}, d_{8} = Polygon(A, B, C, D)
E = Point(a_{8})
hulknurk1, f_{9}, g_{9}, h_{9}, i_{9}, F, G = Polygon(E, B, 4)
H = Point(a_{8})
hulknurk2, j_{9}, k_{9}, l_{9}, m_{9}, I, J = Polygon(H, E, 4)
hulknurk3, n_{9}, p_{9}, q_{9}, r_{9}, K, L = Polygon(A, H, 4)
hulknurk4, s_{10}, t_{10}, e_{8}, f_1, M, N = Polygon(L, J, 4)
hulknurk5, g_1, h_1, i_1, j_1, O, P = Polygon(J, G, 4)
hulknurk6, k_1, l_1, m_1, n_1, Q, R = Polygon(G, F, 4)
hulknurk7, p_1, q_1, r_1, s_1, S, T = Polygon(N, M, 4)
hulknurk8, t_1, a_{10}, b_{10}, c_{10}, U, V = Polygon(M, O, 4)
hulknurk9, d_{10}, e_1, f_2, g_2, W, Z = Polygon(O, Q, 4)
A_1 = (2, -1)
B_1 = (1, -1)
hulknurk10, h_2, i_2, j_2, k_2, C_1, D_1 = Polygon(A_1, B_1, 4)
E_1 = (3, -1)
hulknurk11, l_2, m_2, n_2, p_2, F_1, G_1 = Polygon(E_1, A_1, 4)
H_1 = (4, -1)
hulknurk12, q_2, r_2, s_2, t_2, I_1, J_1 = Polygon(H_1, E_1, 4)
hulknurk13, a_2, b_2, c_2, d_2, K_1, L_1 = Polygon(J_1, G_1, 4)
hulknurk14, e_2, f_3, g_3, h_3, M_1, N_1 = Polygon(G_1, D_1, 4)
hulknurk15, i_3, j_3, k_3, l_3, O_1, P_1 = Polygon(D_1, C_1, 4)
hulknurk16, m_3, n_3, p_3, q_3, Q_1, R_1 = Polygon(L_1, K_1, 4)
hulknurk17, r_3, s_3, t_3, a_3, S_1, T_1 = Polygon(K_1, M_1, 4)
hulknurk18, b_3, c_3, d_3, e_3, U_1, V_1 = Polygon(M_1, O_1, 4)
W_1 = (2, 3)
Z_1 = (1, 3)
hulknurk19, f_4, g_4, h_4, i_4, A_2, B_2 = Polygon(W_1, Z_1, 4)
C_2 = (3, 3)
hulknurk20, j_4, k_4, l_4, m_4, D_2, E_2 = Polygon(C_2, W_1, 4)
F_2 = (4, 3)
hulknurk21, n_4, p_4, q_4, r_4, G_2, H_2 = Polygon(F_2, C_2, 4)
hulknurk22, s_4, t_4, a_4, b_4, I_2, J_2 = Polygon(H_2, E_2, 4)
hulknurk23, c_4, d_4, e_4, f_5, K_2, L_2 = Polygon(E_2, B_2, 4)
hulknurk24, g_5, h_5, i_5, j_5, M_2, N_2 = Polygon(B_2, A_2, 4)
hulknurk25, k_5, l_5, m_5, n_5, O_2, P_2 = Polygon(J_2, I_2, 4)
hulknurk26, p_5, q_5, r_5, s_5, Q_2, R_2 = Polygon(I_2, K_2, 4)
hulknurk27, t_5, a_5, b_5, c_5, S_2, T_2 = Polygon(K_2, M_2, 4)
U_2 = Point(yAxis)
V_2 = (-1, 3)
hulknurk28, d_5, e_5, f_6, g_6, W_2, Z_2 = Polygon(U_2, V_2, 4)
A_3 = (-2, 3)
hulknurk29, h_6, i_6, j_6, k_6, B_3, C_3 = Polygon(V_2, A_3, 4)
D_3 = (-3, 3)
hulknurk30, l_6, m_6, n_6, p_6, E_3, F_3 = Polygon(A_3, D_3, 4)
hulknurk31, q_6, r_6, s_6, t_6, G_3, H_3 = Polygon(Z_2, W_2, 4)
hulknurk32, a_6, b_6, c_6, d_6, I_3, J_3 = Polygon(W_2, B_3, 4)
hulknurk33, e_6, f_7, g_7, h_7, K_3, L_3 = Polygon(B_3, E_3, 4)
hulknurk34, i_7, j_7, k_7, l_7, M_3, N_3 = Polygon(H_3, G_3, 4)
hulknurk35, m_7, n_7, p_7, q_7, O_3, P_3 = Polygon(G_3, I_3, 4)
hulknurk36, r_7, s_7, t_7, a_7, Q_3, R_3 = Polygon(I_3, K_3, 4)
T_3 = Centroid(hulknurk2)
U_3 = Centroid(hulknurk3)
V_3 = Centroid(hulknurk4)
W_3 = Centroid(hulknurk5)
Z_3 = Centroid(hulknurk6)
A_4 = Centroid(hulknurk7)
B_4 = Centroid(hulknurk8)
C_4 = Centroid(hulknurk9)
D_4 = Centroid(hulknurk10)
E_4 = Centroid(hulknurk11)
F_4 = Centroid(hulknurk12)
G_4 = Centroid(hulknurk13)
H_4 = Centroid(hulknurk14)
I_4 = Centroid(hulknurk15)
J_4 = Centroid(hulknurk16)
K_4 = Centroid(hulknurk17)
L_4 = Centroid(hulknurk18)
M_4 = Centroid(hulknurk19)
N_4 = Centroid(hulknurk20)
O_4 = Centroid(hulknurk21)
Q_4 = Centroid(hulknurk1)
P_4 = Centroid(hulknurk22)
R_4 = Centroid(hulknurk23)
S_4 = Centroid(hulknurk24)
T_4 = Centroid(hulknurk25)
U_4 = Centroid(hulknurk26)
V_4 = Centroid(hulknurk27)
W_4 = Centroid(hulknurk28)
Z_4 = Centroid(hulknurk29)
A_5 = Centroid(hulknurk30)
B_5 = Centroid(hulknurk31)
C_5 = Centroid(hulknurk32)
D_5 = Centroid(hulknurk33)
E_5 = Centroid(hulknurk34)
F_5 = Centroid(hulknurk35)
G_5 = Centroid(hulknurk36)
b_7 = Segment(F_4, U_3)
c_7 = Segment(G_4, V_3)
d_7 = Segment(J_4, A_4)
S_3 = Point(b_7)
H_5 = Point(c_7)
I_5 = Point(d_7)
u_{7} = Vector(F_4, S_3)
v_{8} = Vector(G_4, H_5)
w_{8} = Vector(J_4, I_5)
a, J_5, K_5, L_5, M_5, tahk1, tahk2, tahk4, tahk3, tahk5, serv2, serv1, serv3, serv4, serv5, serv7, serv8, serv6 = Prism(hulknurk12, 1)
b, N_5, O_5, P_5, Q_5, tahk6, tahk7, tahk9, tahk8, tahk10, serv10, serv9, serv11, serv12, serv13, serv15, serv16, serv14 = Prism(hulknurk13, 1)
c, R_5, S_5, T_5, U_5, tahk11, tahk12, tahk14, tahk13, tahk15, serv18, serv17, serv19, serv20, serv21, serv23, serv24, serv22 = Prism(hulknurk16, 1)
a' = Translate(a, u_{7})
b' = Translate(b, v_{8})
c' = Translate(c, w_{8})
e_7 = Segment(E_4, T_3)
f_8 = Segment(H_4, W_3)
g_8 = Segment(K_4, B_4)
V_5 = Point(e_7)
W_5 = Point(f_8)
Z_5 = Point(g_8)
u_1 = Vector(E_4, V_5)
v_1 = Vector(H_4, W_5)
w_1 = Vector(K_4, Z_5)
d, A_6, B_6, C_6, D_6, tahk16, tahk17, tahk19, tahk18, tahk20, serv26, serv25, serv27, serv28, serv29, serv31, serv32, serv30 = Prism(hulknurk11, 1)
e, E_6, F_6, G_6, H_6, tahk21, tahk22, tahk24, tahk23, tahk25, serv34, serv33, serv35, serv36, serv37, serv39, serv40, serv38 = Prism(hulknurk14, 1)
f, I_6, J_6, K_6, L_6, tahk26, tahk28, tahk29, tahk27, tahk30, serv41, serv42, serv43, serv44, serv45, serv47, serv48, serv46 = Prism(hulknurk17, 1)
d' = Translate(d, u_1)
e' = Translate(e, v_1)
f' = Translate(f, w_1)
h_8 = Segment(D_4, Q_4)
i_8 = Segment(I_4, Z_3)
j_8 = Segment(L_4, C_4)
M_6 = Point(h_8)
N_6 = Point(i_8)
O_6 = Point(j_8)
u_2 = Vector(D_4, M_6)
v_2 = Vector(I_4, N_6)
w_2 = Vector(L_4, O_6)
g, P_6, Q_6, R_6, S_6, tahk31, tahk33, tahk34, tahk32, tahk35, serv49, serv50, serv51, serv52, serv53, serv55, serv56, serv54 = Prism(hulknurk10, 1)
h, T_6, U_6, V_6, W_6, tahk36, tahk37, tahk39, tahk38, tahk40, serv58, serv57, serv59, serv60, serv61, serv63, serv64, serv62 = Prism(hulknurk15, 1)
i, Z_6, A_7, B_7, C_7, tahk41, tahk43, tahk44, tahk42, tahk45, serv65, serv66, serv67, serv68, serv69, serv71, serv72, serv70 = Prism(hulknurk18, 1)
g' = Translate(g, u_2)
h' = Translate(h, v_2)
i' = Translate(i, w_2)
k_8 = Segment(O_4, U_3)
l_8 = Segment(P_4, V_3)
m_8 = Segment(T_4, A_4)
D_7 = Point(k_8)
E_7 = Point(l_8)
F_7 = Point(m_8)
u_3 = Vector(O_4, D_7)
v_3 = Vector(P_4, E_7)
w_3 = Vector(T_4, F_7)
j, G_7, H_7, I_7, J_7, tahk46, tahk47, tahk49, tahk48, tahk50, serv74, serv73, serv75, serv76, serv77, serv79, serv80, serv78 = Prism(hulknurk21, 2)
k, K_7, L_7, M_7, N_7, tahk51, tahk52, tahk54, tahk53, tahk55, serv82, serv81, serv83, serv84, serv85, serv87, serv88, serv86 = Prism(hulknurk22, 2)
l, O_7, P_7, Q_7, R_7, tahk56, tahk57, tahk59, tahk58, tahk60, serv90, serv89, serv91, serv92, serv93, serv95, serv96, serv94 = Prism(hulknurk25, 2)
j' = Translate(j, u_3)
k' = Translate(k, v_3)
l' = Translate(l, w_3)
n_8 = Segment(N_4, T_3)
p_8 = Segment(R_4, W_3)
q_8 = Segment(U_4, B_4)
S_7 = Point(n_8)
T_7 = Point(p_8)
U_7 = Point(q_8)
u_4 = Vector(N_4, S_7)
v_4 = Vector(R_4, T_7)
w_4 = Vector(U_4, U_7)
m, W_7, Z_7, A_8, B_8, tahk61, tahk62, tahk64, tahk63, tahk65, serv98, serv97, serv99, serv100, serv101, serv103, serv104, serv102 = Prism(hulknurk20, 2)
n, C_8, D_8, E_8, F_8, tahk66, tahk67, tahk69, tahk68, tahk70, serv106, serv105, serv107, serv108, serv109, serv111, serv112, serv110 = Prism(hulknurk23, 2)
o, G_8, H_8, I_8, J_8, tahk71, tahk73, tahk74, tahk72, tahk75, serv113, serv114, serv115, serv116, serv117, serv119, serv120, serv118 = Prism(hulknurk26, 2)
m' = Translate(m, u_4)
n' = Translate(n, v_4)
o' = Translate(o, w_4)
r_8 = Segment(M_4, Q_4)
s_8 = Segment(S_4, Z_3)
t_8 = Segment(V_4, C_4)
V_7 = Point(r_8)
K_8 = Point(s_8)
L_8 = Point(t_8)
u_5 = Vector(M_4, V_7)
v_5 = Vector(S_4, K_8)
w_5 = Vector(V_4, L_8)
p, M_8, N_8, O_8, P_8, tahk76, tahk78, tahk79, tahk77, tahk80, serv121, serv122, serv123, serv124, serv125, serv127, serv128, serv126 = Prism(hulknurk19, 2)
q, Q_8, R_8, S_8, T_8, tahk81, tahk82, tahk84, tahk83, tahk85, serv130, serv129, serv131, serv132, serv133, serv135, serv136, serv134 = Prism(hulknurk24, 2)
r, U_8, V_8, W_8, Z_8, tahk86, tahk88, tahk89, tahk87, tahk90, serv137, serv138, serv139, serv140, serv141, serv143, serv144, serv142 = Prism(hulknurk27, 2)
p' = Translate(p, u_5)
q' = Translate(q, v_5)
r' = Translate(r, w_5)
s_9 = Segment(A_5, Q_4)
t_9 = Segment(Z_4, T_3)
a_9 = Segment(W_4, U_3)
A_9 = Point(s_9)
B_9 = Point(t_9)
C_9 = Point(a_9)
u_6 = Vector(A_5, A_9)
v_6 = Vector(Z_4, B_9)
w_6 = Vector(W_4, C_9)
s, D_9, E_9, F_9, G_9, tahk91, tahk93, tahk94, tahk92, tahk95, serv145, serv146, serv147, serv148, serv149, serv151, serv152, serv150 = Prism(hulknurk30, 3)
t, H_9, I_9, J_9, K_9, tahk96, tahk98, tahk99, tahk97, tahk100, serv153, serv154, serv155, serv156, serv157, serv159, serv160, serv158 = Prism(hulknurk29, 3)
u, L_9, M_9, N_9, O_9, tahk101, tahk103, tahk104, tahk102, tahk105, serv161, serv162, serv163, serv164, serv165, serv167, serv168, serv166 = Prism(hulknurk28, 3)
s' = Translate(s, u_6)
t' = Translate(t, v_6)
u' = Translate(u, w_6)
b_9 = Segment(D_5, Z_3)
c_9 = Segment(C_5, W_3)
d_9 = Segment(B_5, V_3)
P_9 = Point(b_9)
Q_9 = Point(c_9)
R_9 = Point(d_9)
v_7 = Vector(D_5, P_9)
w_7 = Vector(C_5, Q_9)
u_8 = Vector(B_5, R_9)
v, S_9, T_9, U_9, V_9, tahk106, tahk108, tahk109, tahk107, tahk110, serv169, serv170, serv171, serv172, serv173, serv175, serv176, serv174 = Prism(hulknurk33, 3)
w, W_9, Z_9, A_{10}, B_{10}, tahk111, tahk113, tahk114, tahk112, tahk115, serv177, serv178, serv179, serv180, serv181, serv183, serv184, serv182 = Prism(hulknurk32, 3)
a_1, C_{10}, D_{10}, E_{10}, F_{10}, tahk116, tahk117, tahk119, tahk118, tahk120, serv186, serv185, serv187, serv188, serv189, serv191, serv192, serv190 = Prism(hulknurk31, 3)
v' = Translate(v, v_7)
w' = Translate(w, w_7)
a_1' = Translate(a_1, u_8)
e_9 = Segment(G_5, C_4)
f_{10} = Segment(F_5, B_4)
g_{10} = Segment(E_5, A_4)
G_{10} = Point(e_9)
H_{10} = Point(f_{10})
I_{10} = Point(g_{10})
u_9 = Vector(G_5, G_{10})
v_9 = Vector(F_5, H_{10})
w_9 = Vector(E_5, I_{10})
b_1, J_{10}, K_{10}, L_{10}, M_{10}, tahk121, tahk123, tahk124, tahk122, tahk125, serv193, serv194, serv195, serv196, serv197, serv199, serv200, serv198 = Prism(hulknurk36, 3)
c_1, N_{10}, O_{10}, P_{10}, Q_{10}, tahk126, tahk128, tahk129, tahk127, tahk130, serv201, serv202, serv203, serv204, serv205, serv207, serv208, serv206 = Prism(hulknurk35, 3)
d_1, R_{10}, S_{10}, T_{10}, U_{10}, tahk131, tahk132, tahk134, tahk133, tahk135, serv210, serv209, serv211, serv212, serv213, serv215, serv216, serv214 = Prism(hulknurk34, 3)
b_1' = Translate(b_1, u_9)
c_1' = Translate(c_1, v_9)
d_1' = Translate(d_1, w_9)
l1 = Sequence(1, 9)
arv: 3
arv2 = 4 (slider from 1 to 9, step 1)
arv3: 2
tekstiväli1 = Textfield(arv)
tekstiväli2 = Textfield(arv2)
tekstiväli3 = Textfield(arv3)