Denominator

Denominator

Numerator

Numerator

First Fraction

÷

Second Fraction

Show Same Sized Pieces

Rn: 8
Bn: 4
Pn = LCM(Bn, Rn)
ShG = 3 (slider from 0 to Bn, step 1)
ShB = 1 (slider from 0 to Rn, step 1)
ht: (0.1 * (y(Corner[3]) - y(Corner[2])))
dist: (0.85 * (x(Corner[2]) - x(Corner[1])))
B = (-7, 2)
f = PolyLine(B, B + (dist, 0), B + (dist, ht), B + (0, ht), B)
list1 = Sequence(Polygon[B + ((dist * (i - 1) / Bn), 0), B + ((dist * i / Bn), 0), B + ((dist * i / Bn), ht), B + ((dist * (i - 1) / Bn), ht)], i, 1, Bn)
list2 = Sequence(Polygon[B + ((dist * (i - 1) / Bn), 0), B + ((dist * i / Bn), 0), B + ((dist * i / Bn), ht), B + ((dist * (i - 1) / Bn), ht)], i, 1, ShG)
InputBox1 = Textfield(Bn)
InputBox2 = Textfield(Rn)
C = (-7, -1)
P: (-7, 1)
A = (-8.025937470058613, -5.196182520101464)
r = PolyLine(A, A + (dist, 0), A + (dist, ht), A + (0, ht), A)
InputBox3 = Textfield(ShG)
InputBox4 = Textfield(ShB)
E_1 = (-3.453474813922279, -2.8289020564235026)
E_2 = (-6.253474813922284, -2.8289020564235026)
D_1 = (-2.753474813922279, -2.8289020564235026)
E_3 = (-6.953474813922284, -2.8289020564235026)
F_1 = (-5.553474813922282, -2.8289020564235026)
G_1 = (-4.153474813922283, -2.8289020564235026)
H_1: (x(G_1), y(G_1) - 2.5)
I_1: (x(E_1), y(E_1) - 2.5)
J_1: (x(E_2), y(E_2) - 2.5)
K_1: (x(D_1), y(D_1) - 2.5)
L_1: (x(E_3), y(E_3) - 2.5)
M_1: (x(F_1), y(F_1) - 2.5)
f_1 = Segment(E_1, I_1)
g_1 = Segment(E_2, J_1)
h_1 = Segment(D_1, K_1)
i_1 = Segment(E_3, L_1)
j_1 = Segment(F_1, M_1)
k_1 = Segment(G_1, H_1)
G_2 = (-4.853474813922284, -2.8289020564235026)
F_2 = (-2.053474813922285, -2.8289020564235026)
P_1: (x(G_2), y(G_2) - 2.5)
Q_1: (x(F_2), y(F_2) - 2.5)
l_1 = Segment(G_2, P_1)
m_1 = Segment(F_2, Q_1)
D = (-3.195555197972461, 5.868654555892659)
E = (5.791130276719029, 5.9028244626405355)
F: (x(D) + 1.4, y(D))
G: (x(E) + 1.4, y(E))
i = Segment(E, G)
j = Segment(D, F)
a = false
list5, list5_2, list5_3 = fractionbar(B, Pn, 0, dist, ht)
list4, list6, g = fractionbar(C, ShB, ShB, (ShB * dist / Rn), ht)
list3, list3_2, list3_3 = fractionbar((-7, -1), Rn, 0, dist, ht)

Tool: fractionbar
pt, denom, num, dist, ht
Input: A, Bn, b, dist, ht
Output: list1, list2, f

Bn: 4
f = PolyLine(A, A + (dist, 0), A + (dist, ht), A + (0, ht), A)
list1 = Sequence(Polygon[A + ((dist * (i - 1) / Bn), 0), A + ((dist * i / Bn), 0), A + ((dist * i / Bn), ht), A + ((dist * (i - 1) / Bn), ht)], i, 1, Bn)
list2 = Sequence(Polygon[A + ((dist * (i - 1) / Bn), 0), A + ((dist * i / Bn), 0), A + ((dist * i / Bn), ht), A + ((dist * (i - 1) / Bn), ht)], i, 1, b)