Re: fourier descriptors - plotting shapes



I got it!

function [ theta ] = cumubend( t, FD )
%cumubend cumulative angular bend function.
% cumubend(t,FD) is the theta value of the
% cumulative angular bend function at t

theta = -t;

for freq = 1:length(FD(:,1)),
amp = FD(freq,1);
phase = FD(freq,2) / 360 * 2 * pi;
theta = theta + amp * cos(freq * t - phase);
end

Daniel Drucker
.