% Unit Circle
figure(1);
hold on;
x = cos([0 : 0.01 : 2 * pi]);
y = sin([0 : 0.01 : 2 * pi]);
line([0 0], [-1 1], 'color', 'black');
line([-1 1], [0 0], 'color', 'black');
line(x, y, 'color', 'black');
line([0 x(75)], [0 y(75)], 'color', 'black');
line([x(75) x(75)], [0 y(75)], 'color', 'blue');
plot(x(75), y(75), 'red.');


% Chebyshev Points
figure(2);
hold on;
k = 9;
a = 20;
b = 50;
r = (b - a) / 2;
x = r * cos([0 : 0.01 : pi]);
y = r * sin([0 : 0.01 : pi]);
line([a a], [-r r], 'color', 'black');
line([a b], [0 0], 'color', 'black');
line(a + r + x, y, 'color', 'black');

for i = 0 : k
    t = a + r + r * cos(i * pi / k);
    line([t t], [r * sin(i * pi / k) 0], 'color', 'blue');
    plot(t, 0, 'red.');
end

for t = 1 : r / 10 : r
    for i = 0 : k
        plot(a + r + t * cos(i * pi / k), t - r, 'black.');
    end
    A = a + t
    B = b - t
end
