Plotting points on a comet plot

14 visualizaciones (últimos 30 días)
Ram
Ram el 11 de Sept. de 2012
Hi,
I am looking to plot the points that the head of the comet traverses through in the comet plot so that I can get a sense for the density of the points on the comet plot. Can someone please suggest how I can modify comet3 to realize it.
Thanks

Respuestas (2)

Matt Fig
Matt Fig el 11 de Sept. de 2012
Editada: Matt Fig el 11 de Sept. de 2012
According to the doc:
"comet3(X,Y,Z) displays an animated comet plot of the curve through the points [X(i),Y(i),Z(i)]."
Is that what you were looking for?
So,
t = -pi:pi/500:pi;
comet3(sin(5*t),cos(3*t),t)
figure
plot3(sin(5*t),cos(3*t),t,'*')
  1 comentario
Ram
Ram el 12 de Sept. de 2012
Thanks for the answer.
Not exactly.
I am looking to plot the points on the comet plot as the comet head moves through the points. Your solution plots the points after the comet plot is finished. Hope that helps clarify my question

Iniciar sesión para comentar.


Sean de Wolski
Sean de Wolski el 12 de Sept. de 2012
Editada: Sean de Wolski el 12 de Sept. de 2012
comet works by setting the line's 'EraseMode' to 'none' so that the line draws, but does not erase even though the xdata and ydata are no longer stored.
To store the x and y data you need to make a copy of comet that does this.
But you're in luck! I wrote a version to do just this; it's available here: Solution 1-J7IQJJ

Categorías

Más información sobre Creating, Deleting, and Querying Graphics Objects en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by