geoglobe - camera target and position

조회 수: 3 (최근 30일)
Ivan Vuletich
Ivan Vuletich 2020년 7월 22일
답변: Pratheek Punchathody 2020년 10월 22일
How do I set the camera position and target in geoglobe using Matlab code? (Not manually).
I can setup a geoglobe and populate it with data using geoplot3, but I need to set the camera position and target to given geographic locations.

답변 (1개)

Pratheek Punchathody
Pratheek Punchathody 2020년 10월 22일
You can use camtargm()” functions to set the camera target using geographic coordinates. For further information refer to the documentation on camtargm().
tlat = -30;
tlon = -70;
camtargm(tlat,tlon,0);
%Return the camera target in projected Cartesian coordinate system
[x,y,z] = camtargm(tlat,tlong,0);
To set the camera position use camposm()” function to set the camera position using the geographic coordinates. For further information refer to the documentation on camposm()
plat = -50;
plon = 160;
camposm(plat,plon,1);
%Return the camera position in projected Cartesian coordinate system
[x,y,z] = camposm(plat,plong,1);

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by