Anaglyphs from 3-D plots

Module contents

   ANAVIEW() is a single MATLAB M-files that generates an
   anaglyhp from any 3-D plot.

      

anaview Generate anaglyph from 3-D plot

  I=ANAVIEW generates the anaglyph version of the 3-D plot in the
  current axis. 

  The left-right view disparity is computed assuming that the
  distance from the camera position to the camera target is of one
  meter, that the two eyes have distance of 0.1 meters and that the
  screen is at a distance of 1 meter from the observer. 

  Target and image distance can be changed (see options
  below). Generally speaking:

  + Increasing/decreasing the target distance will move the object
    away/closer to the observer.

  + The target distance is represented relative to the screen
    distance. So increasing/decreasing the screen distance while
    keeping the object distance and the true distance to the screen
    constant, will make the object to appear closer/farther.

  + Object points that are farther/closer than the screen will
    appear behind/above the screen.

  All these operations do not change the amount of perspective
  distortion as the object is scaled up/down and the focal length
  stays the same. The focal length can also be changed (see options
  below). A smaller focal length will cause the object to appear
  deeper.

  The following option-value pairs are supported:
  'TargetDistance' [1]
    Distance of camera target. The closer, the more pronounced the
    disparity.

  'ImageDistance' [1]
    Distance of monitor surface. The closer, the deeper the
    objects are pushed.

  'ScaleFocal' [1]
    Multiply camera focal length by this factor, while moving
    closer/farther to the object to keep the target of the same
    size. This step is applied before setting the target and
    screen distances.

  'Background' [0.1]
    Intensity of the background tone (green channel), in the 0-1
    range.

      

demo_anaview Test ANAVIEW function


      

demo_anaview2