N = 7 (slider from 3 to 25, step 1)
P = Point(j)
S = Point(j)
a = Segment(P, S)
b = LineBisector(a)
A = Point(b)
A1: x(A)
f = Ellipse(P, S, A)
L, I_2 = Intersect(f, j)
R: Distance[P, S] / 2 / N
A2: A1 - R
A3: A2 - R
A4: A3 - R
A5: A4 - R
A6: A5 - R
A7: A6 - R
A8: A7 - R
A9: A8 - R
A10: A9 - R
A11: A10 - R
A12: A11 - R
A13: A12 - R
A14: A13 - R
A15: A14 - R
A16: A15 - R
A17: A16 - R
A18: A17 - R
A19: A18 - R
A20: A19 - R
A21: A20 - R
A22: A21 - R
A23: A22 - R
A24: A23 - R
A25: A24 - R
B25 = If(A25 > x(L), A25)
B24 = If(A24 > x(L), A24)
B23 = If(A23 > x(L), A23)
B22 = If(A22 > x(L), A22)
B21 = If(A21 > x(L), A21)
B20 = If(A20 > x(L), A20)
B19 = If(A19 > x(L), A19)
B18 = If(A18 > x(L), A18)
B17 = If(A17 > x(L), A17)
B16 = If(A16 > x(L), A16)
B15 = If(A15 > x(L), A15)
B14 = If(A14 > x(L), A14)
B13 = If(A13 > x(L), A13)
B12 = If(A12 > x(L), A12)
B11 = If(A11 > x(L), A11)
B10 = If(A10 > x(L), A10)
B9 = If(A9 > x(L), A9)
B8 = If(A8 > x(L), A8)
B7 = If(A7 > x(L), A7)
B6 = If(A6 > x(L), A6)
B5 = If(A5 > x(L), A5)
B4 = If(A4 > x(L), A4)
B3 = If(A3 > x(L), A3)
B2 = If(A2 > x(L), A2)
C2: (B2, 0)
D2 = OrthogonalLine(C2, a)
C3: (B3, 0)
D3 = OrthogonalLine(C3, a)
C4: (B4, 0)
D4 = OrthogonalLine(C4, a)
C5: (B5, 0)
D5 = OrthogonalLine(C5, a)
C6: (B6, 0)
D6 = OrthogonalLine(C6, a)
C7: (B7, 0)
D7 = OrthogonalLine(C7, a)
C8: (B8, 0)
D8 = OrthogonalLine(C8, a)
C9: (B9, 0)
D9 = OrthogonalLine(C9, a)
C10: (B10, 0)
D10 = OrthogonalLine(C10, a)
C11: (B11, 0)
D11 = OrthogonalLine(C11, a)
C12: (B12, 0)
D12 = OrthogonalLine(C12, a)
C13: (B13, 0)
D13 = OrthogonalLine(C13, a)
C14: (B14, 0)
D14 = OrthogonalLine(C14, a)
c = OrthogonalLine(A, b)
E2 = Intersect(c, D2)
F2 = Segment(P, E2)
G2 = Segment(E2, S)
H2, I2 = AngularBisector(F2, G2)
E3 = Intersect(H2, D3)
F3 = Segment(P, E3)
G3 = Segment(E3, S)
H3, I3 = AngularBisector(F3, G3)
E4 = Intersect(H3, D4)
F4 = Segment(P, E4)
G4 = Segment(E4, S)
H4, I4 = AngularBisector(F4, G4)
E5 = Intersect(H4, D5)
F5 = Segment(P, E5)
G5 = Segment(E5, S)
H5, I5 = AngularBisector(F5, G5)
E6 = Intersect(H5, D6)
F6 = Segment(P, E6)
G6 = Segment(E6, S)
H6, I6 = AngularBisector(F6, G6)
E7 = Intersect(H6, D7)
F7 = Segment(P, E7)
G7 = Segment(E7, S)
H7, I7 = AngularBisector(F7, G7)
E8 = Intersect(H7, D8)
F8 = Segment(P, E8)
G8 = Segment(E8, S)
H8, I8 = AngularBisector(F8, G8)
E9 = Intersect(H8, D9)
F9 = Segment(P, E9)
G9 = Segment(E9, S)
H9, I9 = AngularBisector(F9, G9)
E10 = Intersect(H9, D10)
F10 = Segment(P, E10)
G10 = Segment(E10, S)
H10, I10 = AngularBisector(F10, G10)
E11 = Intersect(H10, D11)
F11 = Segment(P, E11)
G11 = Segment(E11, S)
H11, I11 = AngularBisector(F11, G11)
E12 = Intersect(H11, D12)
F12 = Segment(P, E12)
G12 = Segment(E12, S)
H12, I12 = AngularBisector(F12, G12)
E13 = Intersect(H12, D13)
F13 = Segment(P, E13)
G13 = Segment(E13, S)
H13, I13 = AngularBisector(F13, G13)
E14 = Intersect(H13, D14)
F14 = Segment(P, E14)
G14 = Segment(E14, S)
H14, I14 = AngularBisector(F14, G14)
J2 = Segment(A, E2)
J3 = Segment(E2, E3)
J4 = Segment(E3, E4)
J5 = Segment(E4, E5)
J6 = Segment(E5, E6)
J7 = Segment(E6, E7)
J8 = Segment(E7, E8)
J9 = Segment(E8, E9)
J10 = Segment(E9, E10)
J11 = Segment(E10, E11)
J12 = Segment(E11, E12)
J13 = Segment(E12, E13)
J14 = Segment(E13, E14)
L_1: Distance[P, A] + Distance[A, S]
h = 0 (slider from 0 to 60, step 0.05)
d = Circle(S, h)
e = Circle(P, L_1 - h)
B, M = Intersect(d, e)
C15: (B15, 0)
D15 = OrthogonalLine(C15, a)
E15 = Intersect(H14, D15)
F15 = Segment(P, E15)
G15 = Segment(E15, S)
H15, I15 = AngularBisector(F15, G15)
J15 = Segment(E14, E15)
C16: (B16, 0)
D16 = OrthogonalLine(C16, a)
E16 = Intersect(H15, D16)
F16 = Segment(P, E16)
G16 = Segment(E16, S)
H16, I16 = AngularBisector(F16, G16)
J16 = Segment(E15, E16)
C17: (B17, 0)
D17 = OrthogonalLine(C17, a)
E17 = Intersect(H16, D17)
F17 = Segment(P, E17)
G17 = Segment(E17, S)
H17, I17 = AngularBisector(F17, G17)
J17 = Segment(E16, E17)
C18: (B18, 0)
D18 = OrthogonalLine(C18, a)
E18 = Intersect(H17, D18)
F18 = Segment(P, E18)
G18 = Segment(E18, S)
H18, I18 = AngularBisector(F18, G18)
J18 = Segment(E17, E18)
C19: (B19, 0)
D19 = OrthogonalLine(C19, a)
E19 = Intersect(H18, D19)
F19 = Segment(P, E19)
G19 = Segment(E19, S)
H19, I19 = AngularBisector(F19, G19)
J19 = Segment(E18, E19)
C20: (B20, 0)
D20 = OrthogonalLine(C20, a)
E20 = Intersect(H19, D20)
F20 = Segment(P, E20)
G20 = Segment(E20, S)
H20, I20 = AngularBisector(F20, G20)
J20 = Segment(E19, E20)
C21: (B21, 0)
D21 = OrthogonalLine(C21, a)
E21 = Intersect(H20, D21)
F21 = Segment(P, E21)
G21 = Segment(E21, S)
H21, I21 = AngularBisector(F21, G21)
J21 = Segment(E20, E21)
C22: (B22, 0)
D22 = OrthogonalLine(C22, a)
E22 = Intersect(H21, D22)
F22 = Segment(P, E22)
G22 = Segment(E22, S)
H22, I22 = AngularBisector(F22, G22)
J22 = Segment(E21, E22)
C23: (B23, 0)
D23 = OrthogonalLine(C23, a)
E23 = Intersect(H22, D23)
F23 = Segment(P, E23)
G23 = Segment(E23, S)
H23, I23 = AngularBisector(F23, G23)
J23 = Segment(E22, E23)
C24: (B24, 0)
D24 = OrthogonalLine(C24, a)
E24 = Intersect(H23, D24)
F24 = Segment(P, E24)
G24 = Segment(E24, S)
H24, I24 = AngularBisector(F24, G24)
J24 = Segment(E23, E24)
C25: (B25, 0)
D25 = OrthogonalLine(C25, a)
E25 = Intersect(H24, D25)
F25 = Segment(P, E25)
G25 = Segment(E25, S)
H25, I25 = AngularBisector(F25, G25)
J25 = Segment(E24, E25)
g = Segment(M, P)
i = Segment(M, S)
Si[A2 > x(I1), A2]: If[A2 > x(I1), A2] * B2
A26: A25 - R
B26 = If(A26 > x(L), A26)
C26: (B26, 0)
D26 = OrthogonalLine(C26, a)
E26 = Intersect(H25, D26)
F26 = Segment(P, E26)
G26 = Segment(E26, S)
H26, I26 = AngularBisector(F26, G26)
J26 = Segment(E25, E26)
A27: A26 - R
B27 = If(A27 > x(L), A27)
C27: (B27, 0)
D27 = OrthogonalLine(C27, a)
E27 = Intersect(H26, D27)
F27 = Segment(P, E27)
G27 = Segment(E27, S)
H27, I27 = AngularBisector(F27, G27)
J27 = Segment(E26, E27)
A28: A27 - R
B28 = If(A28 > x(L), A28)
C28: (B28, 0)
D28 = OrthogonalLine(C28, a)
E28 = Intersect(H27, D28)
F28 = Segment(P, E28)
G28 = Segment(E28, S)
H28, I28 = AngularBisector(F28, G28)
J28 = Segment(E27, E28)
A29: A28 - R
B29 = If(A29 > x(L), A29)
C29: (B29, 0)
D29 = OrthogonalLine(C29, a)
E29 = Intersect(H28, D29)
F29 = Segment(P, E29)
G29 = Segment(E29, S)
H29, I29 = AngularBisector(F29, G29)
J29 = Segment(E28, E29)
A30: A29 - R
B30 = If(A30 > x(L), A30)
C30: (B30, 0)
D30 = OrthogonalLine(C30, a)
E30 = Intersect(H29, D30)
F30 = Segment(P, E30)
G30 = Segment(E30, S)
H30, I30 = AngularBisector(F30, G30)
J30 = Segment(E29, E30)
A31: A30 - R
B31 = If(A31 > x(L), A31)
C31: (B31, 0)
D31 = OrthogonalLine(C31, a)
E31 = Intersect(H30, D31)
F31 = Segment(P, E31)
G31 = Segment(E31, S)
H31, I31 = AngularBisector(F31, G31)
J31 = Segment(E30, E31)
A32: A31 - R
B32 = If(A32 > x(L), A32)
C32: (B32, 0)
D32 = OrthogonalLine(C32, a)
E32 = Intersect(H31, D32)
F32 = Segment(P, E32)
G32 = Segment(E32, S)
H32, I32 = AngularBisector(F32, G32)
J32 = Segment(E31, E32)
A33: A32 - R
B33 = If(A33 > x(L), A33)
C33: (B33, 0)
E33 = Intersect(H32, D33)
F33 = Segment(P, E33)
G33 = Segment(E33, S)
H33 = AngularBisector(F33, G33)
I33 = AngularBisector(F33, G33)
J33 = Segment(E32, E33)
A34: A33 - R
B34 = If(A34 > x(L), A34)
C34: (B34, 0)
E34 = Intersect(H33, D34)
F34 = Segment(P, E34)
G34 = Segment(E34, S)
J34 = Segment(E33, E34)
A35: A34 - R
B35 = If(A35 > x(L), A35)
C35: (B35, 0)
E35 = Intersect(H34, D35)
F35 = Segment(P, E35)
G35 = Segment(E35, S)
J35 = Segment(E34, E35)
A36: A35 - R
B36 = If(A36 > x(L), A36)
C36: (B36, 0)
E36 = Intersect(H35, D36)
F36 = Segment(P, E36)
G36 = Segment(E36, S)
J36 = Segment(E35, E36)
L1 = 0
texte1: "Distance PM + MS = PA + AS =  " + L_1 + ""