Navigation

Operators and Keywords

Function List:

C++ API

: comet (y)
: comet (x, y)
: comet (x, y, p)
: comet (hax, …)

Produce a simple comet style animation along the trajectory provided by the input coordinate vectors (x, y).

If x is not specified it defaults to the indices of y.

The speed of the comet may be controlled by p, which represents the time each point is displayed before moving to the next one. The default for p is 0.1 seconds.

If the first argument hax is an axes handle, then plot into this axis, rather than the current axes returned by gca.

See also: comet3.

Demonstration 1

The following code

 clf;
 title ("comet() animation");
 hold on;
 t = 0:.1:2*pi;
 x = cos (2*t) .* (cos (t).^2);
 y = sin (2*t) .* (sin (t).^2);
 comet (x, y, 0.05);
 hold off;

Produces the following figure

Figure 1

Package: octave