function [ix, iy] = trochoid1(a, r, U, n)

du = U/n;
x = 0;           % x = a*u0 - r*sin(u0);
y = r;           % y = r*cos(u0);
u = 0;           % u = u0;
ix(1) = round(x);
iy(1) = round(y);
for i = 2:n+1
    u = u + du;
    x = a*u - r*sin(u);
    y = r*cos(u);
    ix(i) = round(x);
    iy(i) = round(y);
end
