Syntax
[C/C++:]
void gDefineSphericalView(float xcen, float ycen, float zcen, float rad, float dx, float dy, float dz, float dist);
[F90:]
subroutine gDefineSphericalView(xcen, ycen, zcen, rad, dx, dy, dz, dist)
real, intent(in) :: xcen,ycen,zcen,rad
real, intent(in) :: dx,dy,dz,dist
Arguments
xcen,ycen,zcen
Position of centre of sphere in space coordinates
rad
Radius of sphere in picture coordinates
dx,dy,dz
Direction of viewing
dist
Perspective distance
Description
The routine gDefineSphericalView() sets up a perspective view of the portion of the world enclosed by the specified sphere. The direction of viewing is defined by the vector (
dx,dy,dz) directed towards the centre of the sphere. The viewpoint and position of the view plane are calculated so that the image of the sphere fits as closely as possible into the current window - i.e. the diameter of the sphere when projected onto the view plane equals the minimum window dimension. The window dimensions are defined by the viewport limits unless a user-defined window is currently specified (see gSetWindow2D(), gSetWindow3D() or gSetWindowMode()).
If either
dist or
rad is zero or all of
dx,
dy and
dz are zero, an error message is output and no further action is taken.
See Also
gDefineSphericalView UsagegSetWindow2D
gSetWindow3D
gSetWindowMode