5

A common problem for me is finding the right perspective for 3D graphics.

This example accepts the default viewpoint and produce this: default

Using the mouse, the image is manipulated to something like this: modified

How do I harvest the perspective information so that it can be added to the graphic? My goal is to avoid having to manual adjustments across many files and to automate my process. This precludes using "Save graphics as...".

And for extra credit, how to get rid of white space? Trim Bounding Box produces this unsatisfactory result.

headless

dantopa
  • 1,060
  • 5
  • 10

1 Answers1

2
Manipulate[
 Graphics3D[
 {Opacity[0.5], Sphere[], 
 Red, Thickness[0.02], Line[{{0, 0, 0}, {1, 1, 1}}]},
  ViewPoint -> {x, y, z}], 
  {{x, 1}, -5, 5, Appearance -> "Open"}, 
  {{y, 1}, -5, 5, Appearance -> "Open"}, 
  {{z, 1}, -5, 5, Appearance -> "Open"}]

or Appearance -> "Labeled"

or...

if you want to copy the viewpoint, go to the teeny + at the upper-right corner of the Manipulate panel and select PasteSnapshot, which will paste the values of the parameters.

David G. Stork
  • 41,180
  • 3
  • 34
  • 96