how to animate circle
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone, I want to write code through a plot function that will draw a circle in red, when half a circle will start counterclockwise and the other half will start clockwise and meet in the middle, thank you all!
0 commentaires
Réponses (1)
Abdolkarim Mohammadi
le 9 Avr 2021
You first draw the single point at the top of the circle. Then you edit the XData and YData properties of the line after a pause. For example:
h = plot (0, 0);
for i = ...
h.XData = horzcat (h.XData, NewPointsX);
h.YData = horzcat (h.YData, NewPointsY);
pause (0.5);
end
0 commentaires
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!