is an option for Graphics3D and related functions that gives the opening angle for a simulated camera used to view the three-dimensional scene.
ViewAngle
is an option for Graphics3D and related functions that gives the opening angle for a simulated camera used to view the three-dimensional scene.
Details
- The following settings can be used:
-
All an opening angle sufficient to see everything Automatic a maximum opening angle of
(default) θ an explicit opening angle in radians - With the setting ViewAngle->All, the complete bounding box or circumscribing sphere will, if possible, just fill the final 2D viewing area.
- The default setting of Automatic is equivalent to All when the simulated camera is far from the object, but is constrained never to be greater than
, even when the camera is close. - ViewAngle->35Degree is a typical field of view used for human ergonomics and in cameras.
- Changing the setting for ViewAngle is effectively like zooming a camera.
- Explicit settings for ViewMatrix override settings for ViewAngle.
Examples
open all close allBasic Examples (2)
Use a specific angle for a simulated camera:
Table[Graphics3D[Cylinder[], ViewAngle -> d °], {d, {20, 35, 50}}]The default 35° angle may not be enough for the particular ViewVector setting:
Framed[Graphics3D[{Cylinder[], Sphere[{4, 0, 0}]}, ViewVector -> {{4, -6, 0}, {2, 0, 0}}, ViewAngle -> Automatic, SphericalRegion -> True]]Choose the angle automatically, so that the view includes all the objects:
Graphics3D[{Cylinder[], Sphere[{4, 0, 0}]}, ViewVector -> {{4, -6, 0}, {2, 0, 0}}, ViewAngle -> All]Applications (1)
Illustrate the relation between ViewAngle and the simulated camera view:
cone[y_, θ_] := With[{r = Abs[y]Tan[θ / 2]}, Show[ParametricPlot3D[r{Cos[t], 0, Sin[t]}, {t, 0, 2Pi}, PlotStyle -> Red, Axes -> False], Graphics3D[{Red, PointSize[Large], Point[{0, y, 0}], Line[{{{0, y, 0}, {r, 0, 0}}, {{0, y, 0}, {-r, 0, 0}}}]}]]]Animate[Row[{Show[cone[-3, θ], Graphics3D[{Sphere[], Cuboid[], FaceForm[], EdgeForm[StandardGray], Cuboid[{-1, -1, -1}, {1, 1, 1}]}], PlotRange -> 3, BoxStyle -> Gray], Graphics3D[{Sphere[], Cuboid[]}, ViewVector -> {0, -3, 0}, ViewAngle -> θ]}], {θ, Pi / 4, Pi / 2}, SaveDefinitions -> True, AnimationRunning -> False, AnimationDirection -> ForwardBackward]Related Guides
History
Text
Wolfram Research (2007), ViewAngle, Wolfram Language function, https://reference.wolfram.com/language/ref/ViewAngle.html.
CMS
Wolfram Language. 2007. "ViewAngle." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ViewAngle.html.
APA
Wolfram Language. (2007). ViewAngle. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ViewAngle.html
BibTeX
@misc{reference.wolfram_2026_viewangle, author="Wolfram Research", title="{ViewAngle}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/ViewAngle.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_viewangle, organization={Wolfram Research}, title={ViewAngle}, year={2007}, url={https://reference.wolfram.com/language/ref/ViewAngle.html}, note=[Accessed: 15-June-2026]}