Skip to content

comet3

plot · scripts/plot/draw/comet3.m

: comet3 (x, y, z)
: comet3 (x, y, z, p)
: comet3 (z)
: comet3 (ax, …)

Animate a comet travelling along a three-dimensional trajectory.

A marker (the head) runs along the curve through the points (x(k), y(k), z(k)) followed by a body of length p * numel (z) (default p = 0.1) and the tail, which is the path travelled so far. Afterwards the complete tail remains in the axes. With a single argument z the index 1:numel (z) is used for x and y. The function returns no value.