ViewPoint

ViewPointr is an option for Graphics3D, SurfaceGraphics and funtions that return such graphics. The ViewCenter usage message is shown below.

? ViewPoint

ViewPoint is an option for Graphics3D and SurfaceGraphics which gives the point in space from which the objects plotted are to be viewed. More…

For ViewPoint the coordinates of the bounding box have the range (-0.5, 0.5) along each axis.  The ViewPoint option uses this scaled coordinate system to specify the direction form which the graphics are viewed.  The setting of the ViewPoint option must be a point outside the bounding box.  In the next cell we see the default ViewPoint setting.

AbsoluteOptions[gr, ViewPoint]

RowBox[{{, RowBox[{ViewPoint, , RowBox[{{, RowBox[{1.3, ,, RowBox[{-, 2.4}], ,, 2.}], }}]}], }}]

Because the coordinates used for ViewPoint are scaled to (-0.5,0.5) the viewing angle of the next example is parallel with the left edge and top edge of the bounding box.

RowBox[{RowBox[{Show, [, RowBox[{gr, ,, RowBox[{ViewPoint, ->, RowBox[{{, RowBox[{2, ,, RowBox[{-, 0.5}], ,, 0.5}], }}]}]}], ]}], ;}]

In the next example the last coordinate of the ViewPoint setting is zero, so our viewing angle is centered along the vertical axis.

RowBox[{RowBox[{Show, [, RowBox[{gr, ,, RowBox[{ViewPoint, ->, RowBox[{{, RowBox[{2, ,, RowBox[{-, 0.8}], ,, 0}], }}]}]}], ]}], ;}]

The effects of perspective are severe when the ViewPoint is very close to the edge of the bounding box.  In the next example we see what the graphic would look like to a fly who is about to land on the green point.

RowBox[{RowBox[{Show, [, RowBox[{gr, ,, RowBox[{ViewPoint, ->, RowBox[{{, RowBox[{0.56, ,, RowBox[{-, 0.59}], ,, 0.61}], }}]}]}], ]}], ;}]

In the next example the ViewPoint is far away, and out viewing angle is nearly parallel with the top and bottom surfaces of the bounding box.

Show[gr, ViewPoint-> {18, -4, 0}] ;

Next we view the graphic from a viewing angle that almost lines up opposite corners of the bounding box.

RowBox[{RowBox[{Show, [, RowBox[{gr, ,, RowBox[{ViewPoint, ->, RowBox[{{, RowBox[{2, ,, RowBox[{-, 2.06}], ,, 2.26}], }}]}]}], ]}], ;}]


Created by Mathematica  (May 16, 2004)

Back to Ted’s Tricks index page