a

b

θ_{1}

θ_{2}

θ_{3}

a

b

π

-π

-π

π

-π

π

a

b

a

b

a

b

θ_{1}

θ_{2}

θ_{3}

t

t

t

-π

-π

-π

π

π

π

-π

π

π

-π

π

-π

a_{3,4} = 6 (slider from 0 to 10, step 0.01)
a_{2,3} = 9 (slider from 0 to 10, step 0.01)
a_{1,2} = 9 (slider from 0 to 10, step 0.1)
TopPoint: (0, a_{1,2} + a_{2,3} + a_{3,4})
rb = 0.55 (slider from 0 to 5, step 0.01)
B = (0, 15)
A = (0, -15)
C = (5.5, 0)
c = Ellipse(A, B, C)
beta = Angle(Vector[(1, 0)], Vector[A, B])
t = -2.331592653589793 (slider from -3.141592653589793 to 3.141592653589793, step 0.01)
D: (cos(beta) * FirstAxisLength[c] * cos(t) - sin(beta) * SecondAxisLength[c] * sin(t), sin(beta) * FirstAxisLength[c] * cos(t) + cos(beta) * SecondAxisLength[c] * sin(t)) + Center[c]
a = Tangent(D, c)
b = OrthogonalLine(D, a)
d = Circle(D, rb)
J = Intersect(d, b, 1)
auxd: 2 * a_{1,2} * a_{2,3}
x_D: x(D)
E: J
v = Vector(D, E)
vunit = UnitVector(v)
J_3: D - a_{3,4} * vunit
unit_3 = UnitVector(Vector[J_3, D])
gammarad: atan2(y(vunit),x(vunit))
auxE: x_D - a_{3,4} * cos(gammarad)
y_D: y(D)
auxf: (x_D - a_{3,4} * cos(gammarad))^(2) + (y_D - a_{3,4} * sin(gammarad))^(2) - a_{1,2}^(2) - a_{2,3}^(2)
theta_{2,b}: -acos(auxf / auxd)
auxBb: a_{2,3} * sin(theta_{2,b})
auxAb: a_{1,2} + a_{2,3} * cos(theta_{2,b})
auxF: y_D - a_{3,4} * sin(gammarad)
c_{1,b}: (auxAb * auxE + auxBb * auxF) / (auxAb^(2) + auxBb^(2))
s_{1,b}: (auxAb * auxF - auxBb * auxE) / (auxAb^(2) + auxBb^(2))
theta_{1,b}: atan2(s_{1,b},c_{1,b})
J_{2,b}: a_{1,2} * (cos(theta_{1,b}), sin(theta_{1,b}))
unit_{2,b} = UnitVector(Vector[J_{2,b}, J_3])
s_{3,b}: unit_{2,b} ⊗ unit_3
c_{3,b}: unit_3 * unit_{2,b}
theta_{2,a}: acos(auxf / auxd)
auxBa: a_{2,3} * sin(theta_{2,a})
auxAa: a_{1,2} + a_{2,3} * cos(theta_{2,a})
c_{1,a}: (auxAa * auxE + auxBa * auxF) / (auxAa^(2) + auxBa^(2))
s_{1,a}: (auxAa * auxF - auxBa * auxE) / (auxAa^(2) + auxBa^(2))
theta_{1,a}: atan2(s_{1,a},c_{1,a})
J_{2,a}: a_{1,2} * (cos(theta_{1,a}), sin(theta_{1,a}))
unit_{2,a} = UnitVector(Vector[J_{2,a}, J_3])
s_{3,a}: unit_{2,a} ⊗ unit_3
c_{3,a}: unit_3 * unit_{2,a}
angleplanegap = 0.6 (slider from 0 to 1, step 0.1)
rh = 2.85 (slider from 0 to 15, step 0.01)
F = Intersect(d, a, 2)
G = Intersect(d, a, 1)
H: G - rh * vunit
I: F - rh * vunit
poly1, e, f, g, h, i = Polygon({F, G, H, I, F})
l_{ef} = 0.6
K: H + l_{ef} * vunit
L: I + l_{ef} * vunit
O = (0, 0)
J_1: O
Circ_3 = Circle(J_3, a_{2,3})
Circ_1 = Circle(J_1, a_{1,2})
link_{2,a} = Segment(J_{2,a}, J_3)
link_{2,b} = Segment(J_{2,b}, J_3)
link_{1,a} = Segment(J_1, J_{2,a})
link_{1,b} = Segment(J_1, J_{2,b})
OuterBoundary = Circle(J_1, a_{1,2} + a_{2,3} + a_{3,4})
effectorline = PolyLine(L, I, H, K)
link_3 = Segment(J_3, Midpoint[H, I])
P12a: (theta_{1,a}, theta_{2,a})
P12b: (theta_{1,b}, theta_{2,b})
angleplane12 = Polygon({(3.141592653589793, -3.141592653589793), (3.141592653589793, 3.141592653589793), (-3.141592653589793, 3.141592653589793), (-3.141592653589793, -3.141592653589793)})
angleplane13, j, k, l, m = Polygon({(π, -9.72478 + 0.3 - angleplanegap), (π, -3.44159 + 0.3 - angleplanegap), (-3.14159, -3.44159 + 0.3 - angleplanegap), (-3.14159, -9.72478 + 0.3 - angleplanegap)})
theta_{3,b}: atan2(s_{3,b},c_{3,b})
theta_{3,a}: atan2(s_{3,a},c_{3,a})
unit_{1,a} = UnitVector(Vector[J_1, J_{2,a}])
unit_{1,b} = UnitVector(Vector[J_1, J_{2,b}])
P13a: (theta_{1,a}, theta_{3,a} - 2 * π - angleplanegap)
P13b: (theta_{1,b}, theta_{3,b} - 2 * π - angleplanegap)
axis1 = Segment((-3.141592653589793, 0), (3.141592653589793, 0))
axis2 = Segment((0, -3.141592653589793), (0, 3.141592653589793))
axis4 = Segment((0, -π - 2 * π - angleplanegap), (0, π - 2 * π - angleplanegap))
axis3 = Segment((-3.14159, 0 - 2 * π - angleplanegap), (π, 0 - 2 * π - angleplanegap))
ellipse_{semimajoraxis} = FirstAxisLength(c)
ellipse_{semiminoraxis} = SecondAxisLength(c)
theta1plane, n, p, q, r = Polygon({(10.42478, -3.14159), (10.42478, 3.141592653589793), (4.1416, 3.141592653589793), (4.1416, -3.14159)})
ellipse_{center} = Midpoint(A, B)
theta2plane = Polygon({(10.42478, -3.14159 - 2 * π - angleplanegap), (10.42478, π - 2 * π - angleplanegap), (4.1416, π - 2 * π - angleplanegap), (4.1416, -3.14159 - 2 * π - angleplanegap)})
theta3plane = Polygon({(10.42478, -3.14159 - 2 * π - angleplanegap - 2 * π - angleplanegap), (10.42478, π - 2 * π - angleplanegap - 2 * π - angleplanegap), (4.1416, π - 2 * π - angleplanegap - 2 * π - angleplanegap), (4.1416, -3.14159 - 2 * π - angleplanegap - 2 * π - angleplanegap)})
T1a: (t, theta_{1,a}) + (2 * π + 1, 0)
T1b: (t, theta_{1,b}) + (2 * π + 1, 0)
T2a: (t, theta_{2,a}) + (2 * π + 1, 0 - 2 * π - angleplanegap)
T2b: (t, theta_{2,b}) + (2 * π + 1, 0 - 2 * π - angleplanegap)
T3a: (t, theta_{3,a}) + (2 * π + 1, 0 - 4 * π - 2 * angleplanegap)
T3b: (t, theta_{3,b}) + (2 * π + 1, 0 - 4 * π - 2 * angleplanegap)
axis5 = Segment((4.141595307179586, 0), (10.42477796076938, 0))
axis6 = Segment((7.283185307179586, -3.14159), (7.283185307179586, 3.141592653589793))
axis7 = Segment((4.1416, 0 - 2 * π - angleplanegap), (10.42478, -2 * π - angleplanegap))
axis9 = Segment((4.1416, 0 - 4 * π - 2 * angleplanegap), (10.42478, -4 * π - 2 * angleplanegap))
axis8 = Segment((7.28319, -3.14159 - 2 * π - angleplanegap), (7.28319, π - 2 * π - angleplanegap))
axis10 = Segment((7.28319, -3.14159 - 4 * π - 2 * angleplanegap), (7.28319, π - 4 * π - 2 * angleplanegap))
r_q = 0.2
q_1 = Circle(T1a, r_q)
q_2 = Circle(T1b, r_q)
q_3 = Circle(T2a, r_q)
q_4 = Circle(T2b, r_q)
q_5 = Circle(T3a, r_q)
q_6 = Circle(T3b, r_q)