Perimeter

width

Graph

position

P: 6
r = 1 (slider from 0 to 2)
A = (0, 0)
t = 0 (slider from 0 to (2 * π) + P, step 0.01)
G: (1, 0)
w = 2 (slider from 0 to P / 2 - 0.01, step 0.01)
K: (r + P / 4 + 1, 0)
l: (1 / 2 * (P - (2 * w)))
angle(x) = If[0 ≤ x < 1.5707963267948966, x, If[π / 2 ≤ x < π / 2 + w, π / 2, If[π / 2 + w ≤ x < π + w, x - w, If[π + w ≤ x < π + w + l, π, If[π + w + l ≤ x < (3 * π / 2) + w + l, x - w - l, If[(3 * π / 2) + w + l ≤ x < (3 * π / 2) + (2 * w) + l, (3 * π / 2), If[(3 * π / 2) + (2 * w) + l ≤ x < (2 * π) + (2 * w) + l, x - (2 * w) - l, If[(2 * π) + (2 * w) + l ≤ x < (2 * π) + P, (2 * π)]]]]]]]]
u = Vector((0, 0), (w, 0))
p(x) = If[0 ≤ x < π + w, 0, If[π + w ≤ x < π + w + l, ((-x) + π + w + l) / l - 1, If[π + w + l ≤ x < (2 * π) + (2 * w) + l, -1, If[(2 * π) + (2 * w) + l ≤ x < (2 * π) + P, (x - (2 * π) - P) / l]]]]
q(x) = If[0 ≤ x < 1.5708, 0, If[π / 2 ≤ x < π / 2 + w, ((-x) + π / 2) / w, If[π / 2 + w ≤ x < (3 * π / 2) + l + w, -1, If[(3 * π / 2) + w + l ≤ x < (3 * π / 2) + (2 * w) + l, (x - (3 * π / 2) - w - l) / w - 1, If[(3 * π / 2) + (2 * w) + l ≤ x, 0]]]]]
v = Vector((0, 0), (0, l))
B: Rotate[G, angle(t)] + (p(t) * v) + (q(t) * u)
e = Circle(B, l)
d = Circle(B, w)
g = OrthogonalLine(B, xAxis)
D = Intersect(e, g, 2)
f = OrthogonalLine(B, yAxis)
C = Intersect(d, f, 1)
F = Midpoint(D, C)
α = Angle(G, A, F)
j = Segment(A, F)
c = Circle(A, r)
h = Circle(C, l)
i = OrthogonalLine(C, f)
E = Intersect(h, i, 1)
q1, b, d_1, e_1, c_1 = Polygon(B, D, E, C)
slideX: 0
L_1: {(x(B) - slideX, y(B)), (x(D) - slideX, y(D)), (x(E) - slideX, y(E)), (x(C) - slideX, y(C))}
q2 = Polygon(L_1)
G' = Rotate(G, angle(t))
InputBox1 = Textfield(P)
InputBox2 = Textfield(w)
H: (p(t) * v)
I: (q(t) * u)
TraceL: (α + x(K), j)
k = OrthogonalLine(TraceL, xAxis)
J = Intersect(k, xAxis)
m = Segment(TraceL, J)
loc1 = Locus(TraceL, t)
loc2 = Locus(F, t)
n = OrthogonalLine(K, xAxis)
s = OrthogonalLine(K, yAxis)
N: (x(K) + (2 * π), 0)
a = Segment(K, N)
L: (x(K), y(K) + r + P / 4 + 1)
f_1 = Segment(K, L)
o = true
InputBox3 = Textfield(t)