Main Content

camupm

Set camera up vector for axesm-based map using geographic coordinates

Syntax

camupm(lat,long)
[x,y,z] = camupm(lat,long)

Description

camupm(lat,long) sets the axes CameraUpVector property of the current axesm-based map to the position specified in geographic coordinates. The inputs lat and long are assumed to be in the angle units of the current axesm-based map.

[x,y,z] = camupm(lat,long) returns the camera position in the projected Cartesian coordinate system.

Examples

collapse all

Load elevation data and a geographic cells reference object for the world. Display the data on a globe using a colormap appropriate for elevation data. Add a light source.

load topo60c

figure
axesm("globe",galt=0)
geoshow(topo60c,topo60cR,DisplayType="texturemap")
gridm(glinestyle='-')
axis off
demcmap(topo60c)

camlight
material(0.6*[1 1 1])

Figure contains an axes object. The hidden axes object contains 3 objects of type surface, line.

Control the view by specifying the camera target, camera up vector, camera position, and camera view angle.

  • Specify the camera target and the camera up vector using a point near northern Australia.

  • Specify the camera position using a point near New Zealand. Specify the camera height as one Earth radius above Earth.

  • Specify the field of view by setting the CameraViewAngle property of the axes.

tlat = -13;
tlon = 132;
camtargm(tlat,tlon,0)
camupm(tlat,tlon)

camposm(-42,179,1)

ax = gca;
ax.CameraViewAngle = 75;

Figure contains an axes object. The hidden axes object contains 3 objects of type surface, line.

Version History

Introduced before R2006a

See Also

| | |