ViewCenter

ViewCenter

is an option for Graphics3D and related functions which gives the scaled coordinates of the point which should appear at the center of the final image.

Details

  • With the default setting ViewCenter->Automatic, the whole bounding box is centered in the final image.
  • ViewCenter->Automatic is equivalent to ViewCenter->{1/2,1/2,1/2}, which places the center of the three-dimensional bounding box at the center of the final image.
  • The setting for ViewCenter is given in scaled coordinates, which run from 0 to 1 across each dimension of the bounding box.
  • ViewCenter->{{x,y,z},{px,py}} makes the 3D point with scaled coordinates (x,y,z) appear at scaled coordinate position (px,py) in the final 2D image.
  • The default is ViewCenter->{{x,y,z},ImageScaled[{1,1}/2]}.
  • In a notebook front end, rotating a 3D object by dragging the mouse does not change the setting for ViewCenter. Panning changes the second element in the ViewCenter list.
  • Explicit settings for ViewVector override settings of the form ViewCenter->{x,y,z}.
  • Explicit settings for ViewMatrix always override settings for ViewCenter.

Examples

Basic Examples  (3)

Place the center of the objects at the center of the final image:

Place the top-right corner of the objects at the center of the final image:

Use the ViewCenter->{vc,vp} to specify that the 3D point vc is mapped to the 2D point vp:

Wolfram Research (1991), ViewCenter, Wolfram Language function, https://reference.wolfram.com/language/ref/ViewCenter.html (updated 2007).

Text

Wolfram Research (1991), ViewCenter, Wolfram Language function, https://reference.wolfram.com/language/ref/ViewCenter.html (updated 2007).

CMS

Wolfram Language. 1991. "ViewCenter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/ViewCenter.html.

APA

Wolfram Language. (1991). ViewCenter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ViewCenter.html

BibTeX

@misc{reference.wolfram_2024_viewcenter, author="Wolfram Research", title="{ViewCenter}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/ViewCenter.html}", note=[Accessed: 09-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_viewcenter, organization={Wolfram Research}, title={ViewCenter}, year={2007}, url={https://reference.wolfram.com/language/ref/ViewCenter.html}, note=[Accessed: 09-December-2024 ]}