how to animate circle
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Abdolkarim Mohammadi
2021년 4월 9일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!