%% ANIMATED VERSION: RUN this in Matlab (rather than publish)

%% Cycloid
% Consider the curve r(t) = ( t-sin(t), 1-cos(t) ). Plot the curve for t going from 0 to 4*pi. 
syms t real                                % declare t as real symbolic value
r = [t-sin(t),1-cos(t),0];                 % need 3D curve since 'animate' only works with ezplot3
ezplot3(r(1),r(2),r(3),[0,4*pi],'animate'); 
axis equal; view(0,90)                     % look at x,y plane

