How to draw camera "viewport" on the plot?
5 次查看(过去 30 天)
显示 更早的评论
I want to draw camera's "viewport" on the plot. By saying "Viewport" I mean the borders of the "photo" on the following figure:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/158516/image.gif)
According to the manual, the "viewport" is defined by the CameraViewAngle parameter and the orientation of the axes.
I can draw the "viewport" rectangle using the following function:
annotation(gcf,'rectangle','Position', [x, y, w, h]);
where [x,y,w,h] are the coordinates of the rectangle in figure's "normalized coordinates". The question is: how can I get these coordinates?
P.S. To draw the "viewport" one needs the aspect ratio of the "photo". Let us assume that the aspect ratio is 4/3.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Camera Views 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!