efourier.shape
calculates a "Fourier elliptical shape" given Fourier coefficients (see Details
) or can generate some "efourier" shapes.efourier.shape(an, bn, cn, dn, nb.h, nb.pts=80, alpha=2, plot=TRUE)
numeric
. The $a_n$ Fourier coefficients on which to calculate a shape.numeric
. The $b_n$ Fourier coefficients on which to calculate a shape.numeric
. The $c_n$ Fourier coefficients on which to calculate a shape.numeric
. The $d_n$ Fourier coefficients on which to calculate a shape.integer
. The number of harmonics to use.integer
. The number of points to calculate.numeric
. The power coefficient associated with the (usually decreasing) amplitude of the Fourier coefficients (see Details).logical
. Whether to plot or not the shape.vector
of x
-coordinates.vector
of y
-coordinates.efourier.shape
can be used by specifying nb.h
and alpha
. The coefficients are then sampled in an uniform distribution $(-\pi ; \pi)$ and this amplitude is then divided by $harmonicrank^alpha$. If alpha
is lower than 1, consecutive coefficients will thus increase. See efourier for the mathematical background.data(bot)
ef <- efourier(bot@coo[[1]], 24)
efourier.shape(ef$an, ef$bn, ef$cn, ef$dn) # equivalent to efourier.i(ef)
efourier.shape() # is autonomous
efourier.shape(nb.h=12)
efourier.shape(nb.h=12, alpha=0.5)
panel(Coo(replicate(100, l2m(efourier.shape(nb.h=6, alpha=2.5, plot=FALSE))))) # Bubble family
panel(Coo(replicate(100, l2m(efourier.shape(nb.h=12, alpha=0.5, nb.pts=80, plot=FALSE)))))# some doodle
Run the code above in your browser using DataLab