- 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
86 次查看(过去 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!