- Create a patch and record its handle. At each time step, update the patch XData and YData and ZData properties.
- Create a patch and record its handle. At each time step, update the Vertices properties
- Create hgtransform group and record its handle. Create a patch and set its parent to be the hgtransform group. At each time step, update the transform matrix of the hgtransform group.
Moving 3D patch object along a trajectory
82 ビュー (過去 30 日間)
古いコメントを表示
Hello
I created a 3D object with the patch function. I want to move this object along a trajectory, where the coordinates are functions of time. I want to move the object along the trajectory and show the plot as an animation of the object's motion by generating the path coordinates with a for loop, with time being the variable that changes with each iteration. I want to move the object by adding the coordinates of its original vertices to those of the path, dependent on time. I am not sure how to do this though. Any help would be appreciated. Thank you.
0 件のコメント
採用された回答
Walter Roberson
2019 年 10 月 14 日
There are three ways of doing this.
The third option would always translate and rotate the patch as a group -- a rigid movement. The second option would encourage keeping the same face connections but would permit the vertices to move comparatively freely within that (e.g., a square could easily become a pentagram.) The first option permits more arbitrary movement of the vertices (but if you add new vertices along the way then you might need to update more properties.)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Graphics Performance についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!