//// Camera // L3P's automatic camera positioning was based on the following: // L3Latitude=30 // L3Longitude=45 // L3Radius=1484.99 // L3PercentageBack=0 // L3ViewingAngle=45 // L3RollAngle=0 // L3AspectRatio=4/3 // If changed below, objects may no longer fit into the view. camera { #declare L3PercentageBack = 50; // Percentage of radius #declare L3Orthographic = 0; // Set to 1 for orthographic view #declare L3ViewingAngle = 45; // degrees #declare L3RollAngle = 0; // degrees #declare L3AspectRatio = 4/3; #declare L3Sky = -y; #declare L3StereoAngle = 5; // degrees //5 degrees corresponds to a distance between eyes (stereo cameras) //of 1/12 of distance to model. #declare L3StereoView = 0; // Normal view //Uncomment either two lines below to make stereo images: //#declare L3StereoView = -L3StereoAngle/2; // Left view //#declare L3StereoView = L3StereoAngle/2; // Right view #if (version >= 3.5) #if (abs(L3AspectRatio-image_width/image_height) > 0.01) #error "L3AspectRatio does not match image size. Select a correct image size or use option -car." #end #end sky L3Sky right -L3AspectRatio*x #if (L3Orthographic) #error "* * doesn't work yet..." orthographic #declare L3LookAt = <1.25023,-210,-2>; // BBox center (not -cla) #declare L3OrthoScale = (1+L3PercentageBack/100.0)*891.485; #declare L3Location = L3LookAt - 2000*<-0.612372,0.5,0.612372>; location L3Location scale L3OrthoScale #else #declare L3LookAt = <-59.5871,-39.1182,-202.362>; // Calculated (not -cla) #declare L3Location = <849.779,-781.613,-1111.73>; #declare L3Location = L3Location + L3PercentageBack/100.0*(L3Location-L3LookAt); //#if (L3StereoView) // #declare L3Location = L3LookAt + vaxis_rotate(L3Location-L3LookAt, <-0.353553,-0.866025,0.353553>, L3StereoView); //#end angle L3ViewingAngle location L3Location #end look_at L3LookAt rotate <0,1e-5,0> // Prevent gap between adjacent quads #declare Closer = L3LookAt+0.1*(L3Location-L3LookAt); translate -L3Location #declare vx=vaxis_rotate(x,L3LookAt-L3Location,L3RollAngle); #declare vy=vaxis_rotate(y,L3LookAt-L3Location,L3RollAngle); #declare vz=vaxis_rotate(z,L3LookAt-L3Location,L3RollAngle); matrix translate L3Location #if (L3StereoView) translate -L3Location #declare Ver=<-0.353553,-0.866025,0.353553>; #declare vx=vaxis_rotate(x,Ver,L3StereoView); #declare vy=vaxis_rotate(y,Ver,L3StereoView); #declare vz=vaxis_rotate(z,Ver,L3StereoView); matrix #declare L3Location = L3LookAt + vaxis_rotate(L3Location-L3LookAt, Ver, L3StereoView); translate L3Location #end ////////////////////////////////////////////////// // What about L3RollAngle... before/after stereo ? ////////////////////////////////////////////////// //Rotate model around its center: //translate -L3ModelBBoxCenter //rotate <0,360*clock,0> //translate L3ModelBBoxCenter }