({{, (RefLink[ViewProjection, paclet:ref/ViewProjection]) 
is an option for three-dimensional graphics that specifies the projection to use for the graphic.}})

OpenersNotesSection(Spacer1)Details

The following settings can be given for (RefLink[ViewProjection, paclet:ref/ViewProjection]):

Perspective projection results in a foreshortening effect where the more distant an object is from the viewer, the smaller it appears. Parallel lines that point into the screen will eventually converge if extended far enough.

Orthographic projection preserves the apparent sizes of objects regardless of the distance from the viewer. Parallel lines running into the screen never converge.

(RefLink[ViewProjection, paclet:ref/ViewProjection])->(RefLink[Automatic, paclet:ref/Automatic]) defaults to the "Perspective" projection unless one of the (RefLink[ViewPoint, paclet:ref/ViewPoint]) parameters is infinite.

Orthographic projection corresponds to a perspective view infinitely far from the view center. This means that even if (RefLink[ViewProjection, paclet:ref/ViewProjection])->"Perspective" is set, when the (RefLink[ViewPoint, paclet:ref/ViewPoint]) is significantly far from the (RefLink[ViewCenter, paclet:ref/ViewCenter]), the final image will appear orthographic.

OpenersPrimaryExamplesSection(Spacer1)Examples  (7)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

By default, 3D graphics use a perspective projection:

Graphics3D[Cuboid[]]

Specify an orthographic projection instead:

Graphics3D[Cuboid[],ViewProjection->"Orthographic"]

OpenersExampleSection1(Spacer1)Scope  (3)

An orthographic projection for an arbitrary viewpoint:

Graphics3D[Cuboid[],ViewPoint->{1,1,1},ViewProjection->"Orthographic"]

A perspective projection for an arbitrary viewpoint:

Graphics3D[Cuboid[],ViewPoint->{1,1,1},ViewProjection->"Perspective"]

A perspective projection that is significantly far away will appear orthographic:

Graphics3D[Cuboid[],ViewPoint->{10000,10000,10000},ViewProjection->"Perspective"]

The view projection option similarly applies to (RefLink[Plot3D, paclet:ref/Plot3D]):

Plot3D[Sin[x]+Cos[y],{x,-6,6},{y,-6,6},ColorFunction->"SunsetColors",ViewProjection->"Orthographic", ViewPoint->{0,0,2},Lighting->{{"Ambient",White}},Mesh->None]

OpenersExampleSection2(Spacer1)Generalizations & Extensions  (1)

The default projection for an arbitrary (RefLink[ViewPoint, paclet:ref/ViewPoint]) will return a perspective projection:

Graphics3D[Cuboid[], ViewPoint->{1,1,1}]

Setting a (RefLink[ViewPoint, paclet:ref/ViewPoint]) with an infinite value will instead use an orthographic projection:

{Graphics3D[Cylinder[],ViewPoint->{0,-Infinity,0}],
Graphics3D[Cylinder[],ViewPoint->{0,0,Infinity}]}

OpenersExampleSection4(Spacer1)Applications  (1)

spaceShuttle = ExampleData[{"Geometry3D", "SpaceShuttle"}];
Grid[{{Show[spaceShuttle, ViewProjection->"Orthographic",ViewPoint->Front,ImageSize->150],Show[spaceShuttle, ViewProjection->"Orthographic",ViewPoint->Left ,ImageSize->150] },{Show[spaceShuttle, ViewProjection->"Orthographic",ViewPoint->Top ,ImageSize->150],Show[spaceShuttle, ViewProjection->"Perspective",ViewPoint->{Top, Left, Front} ,ImageSize->150]}},Dividers->Center]

OpenersExampleSection5(Spacer1)Possible Issues  (1)

A (RefLink[ViewPoint, paclet:ref/ViewPoint]) sufficiently far from the camera is effectively orthographic:

Table[Graphics3D[Cuboid[],ViewPoint->{50000,50000,50000},ViewProjection->proj],{proj,{"Orthographic","Perspective"}}]

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

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