필터 지우기
필터 지우기

How to draw camera "viewport" on the plot?

조회 수: 3 (최근 30일)
Dmitry
Dmitry 2016년 3월 22일
I want to draw camera's "viewport" on the plot. By saying "Viewport" I mean the borders of the "photo" on the following figure:
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개)

카테고리

Help CenterFile Exchange에서 Camera Views에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by