function X=frog(U)
% this function takes a 3-column input matrix U with [theta,phi,d]
% in each row and transforms it into a 2-column output matrix X with
% [x,y] U each row.

b = 0.1;
h = 0.03;
d = 0.1;

X = [b*cos(U(:,1))+(h+U(:,3)).*cos(U(:,1)+U(:,2)) , ...
	 b*sin(U(:,1))+(h+U(:,3)).*sin(U(:,1)+U(:,2))];
 
