({{, (RefLink[ViewVector, paclet:ref/ViewVector])
is an option for (RefLink[Graphics3D, paclet:ref/Graphics3D]) and related functions which specifies the position and direction of a simulated camera used to view three-dimensional objects. }})

OpenersNotesSection(Spacer1)Details

With the default setting (RefLink[ViewVector, paclet:ref/ViewVector])->(RefLink[Automatic, paclet:ref/Automatic]), the position and direction of the simulated camera is determined by the settings for (RefLink[ViewPoint, paclet:ref/ViewPoint]) and (RefLink[ViewCenter, paclet:ref/ViewCenter]).

(RefLink[ViewVector, paclet:ref/ViewVector])->{x,y,z} specifies that the camera should be at the position with coordinates {x,y,z}, aimed in the direction specified by (RefLink[ViewCenter, paclet:ref/ViewCenter]).

(RefLink[ViewVector, paclet:ref/ViewVector])->{{x,y,z},{tx,ty,tz}} specifies that the camera should be aimed in the direction of the point {tx,ty,tz}.

Scaled coordinates can be used.

How much the simulated camera sees is determined by settings for (RefLink[ViewAngle, paclet:ref/ViewAngle]) and (RefLink[ViewRange, paclet:ref/ViewRange]).

Explicit settings for (RefLink[ViewVector, paclet:ref/ViewVector]) override settings for (RefLink[ViewPoint, paclet:ref/ViewPoint]) and settings for (RefLink[ViewCenter, paclet:ref/ViewCenter]) of the form (RefLink[ViewCenter, paclet:ref/ViewCenter])->{x,y,z}.

Explicit settings for (RefLink[ViewMatrix, paclet:ref/ViewMatrix]) override settings for (RefLink[ViewVector, paclet:ref/ViewVector]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Specify the view vectors using ordinary coordinates:

Graphics3D[Cylinder[],ViewVector->{{5,-5,5},{5,0,-5}}]

OpenersExampleSection1(Spacer1)Neat Examples  (1)

Camera path following a particular parametric curve:

With[{obj=PolyhedronData["Icosahedron"]},Animate[Show[obj,SphericalRegion->True,ViewVector->{5Cos[t],5Sin[t],10Sin[t/2]}],{t,0,4Pi},AnimationRunning->False]]

Parametric plot of the camera path:

ParametricPlot3D[{5Cos[t],5Sin[t],10Sin[t/2]},{t,0,4Pi}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ViewPoint, paclet:ref/ViewPoint])  ▪  (RefLink[ViewCenter, paclet:ref/ViewCenter])  ▪  (RefLink[ViewMatrix, paclet:ref/ViewMatrix])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[The Structure of Graphics, paclet:tutorial/TheStructureOfGraphics])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[3D Graphics Options, paclet:guide/3DGraphicsOptions])}, {▪(RefLinkPlain[Graphics Coordinates, paclet:guide/GraphicsCoordinates])}})}})