// stereo view:
#declare Eye_Distance =
pow( -1, frame_number ) * 0.4;
// pow( -1, frame_number ) =
// "-1" for left eye's view ,
// "+1" for right eye's view;
// stereo starts: frame_number = 1
// odd frame numbers 1, 3, 5, ... = right
// even frame number 2, 4, 6, ... = left
// non-stereo view (frame_number = 0 )
#if( frame_number = 0 )
#declare Eye_Distance = 0;
#end //---------------------------------
//--------------------------------------
#declare Camera_Position=<2.5,3.5,-1.5>;
#declare Camera_Look_At = <0,1.5,0>;
#declare Camera_Angle = 65 ;
//--------------------------------------
camera{
location Camera_Position
+ Eye_Distance/2
* vnormalize(
vcross(
Camera_Look_At-Camera_Position,
<0,1,0>
)// vcross
)// vnormalize
right x*image_width/image_height
angle Camera_Angle
look_at Camera_Look_At
} // end camera |