Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

First off, I apologize that I can't come up with a simpler working example, but I only seem to have this problem with the larger examples.

I am trying to make animations, using functions like the ones listed here. In order to make an animation, I need for the resulting 3D image to have a stationary camera. Here are two examples that I can't get this to work on. My apologies on the filesize, both of the images are 14MB when put into a text file.

img1 = Import["https://dl.dropboxusercontent.com/s/8878c5m3cjv2zmv/img1.m"];
img2 = Import["https://dl.dropboxusercontent.com/s/qbyx4t7yexoerqc/img2.m"];
    GraphicsRow[{img1, img2}]

enter image description here

If it isn't obvious that the two images have a different orientation, then try this:

    Manipulate[Show[{img1, img2}[[n]], ImageSize -> 500], {n, {1, 2}}]

I have even tried to make sure that they have the same options for ViewPoint, ViewVertical, and ViewCenter. This can be verified by a function I made,

Quiet[viewpoint[graphics_] := 
    Evaluate[
     FilterRules[{AbsoluteOptions[graphics]}, {ViewPoint, 
       ViewVertical, ViewCenter}]];];
viewpoint /@ {img1, img2}

which returns

(*{{ViewCenter -> {0.5, 0.5, 0.5}, ViewPoint -> {0.141, 0.19199, -3.37},
   ViewVertical -> {0.0417, 0.0978, -2.0278}}, {ViewCenter -> {0.5, 
    0.5, 0.5}, ViewPoint -> {0.141, 0.19199, -3.37}, 
  ViewVertical -> {0.0417, 0.0978, -2.0278}}}*)

So what am I missing? How can I make sure that every single time I create a 3D image that the view is identical? Is there another important viewing option besides those 3?

Thanks in advance.

share|improve this question
    
I don't understand. Are the two image files supposed to be EXACTLY the same? The ViewXXX parms are referred to the coordinate axes, not to the image itself –  belisarius May 16 at 22:43
    
There are more View* options: ViewVector, ViewAngle, ViewVertical, ViewPoint, ViewCenter, and ViewRange (I think the first three are the ones you need to fix). Instead of setting each of these individually, you can just set the ViewMatrix (which in turn depends on these) and you should be fine. See this question for more, especially Heike's answer: mathematica.stackexchange.com/q/3528/5 (I think this fully addresses what you want to achieve) –  rm -rf May 16 at 22:44
    
@belisarius The two images are not exactly the same. In particular, the blue and red surfaces are different in the images. But the coordinate system is the same, the coordinates of the stick-and-ball model are the same. So I should be able to make images that have the model in exactly the same spot but the surfaces move. –  Jason B May 16 at 22:46
    
Ah, ok. I understand now –  belisarius May 16 at 22:48
    
@rm-rf, I am not finding the page you linked to to be especially helpful. In particular, I don't see that anyone answered the OP's question. What I apparently want is a function that can operate on a graphics object and return the ViewMatrix. –  Jason B May 16 at 23:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.