MDL Examples
Cornell University Program of Computer Graphics

These examples were generated using Pete Shirley's eon renderer.


Pinhole camera

Here are three green squares viewed through a pinhole camera.



The mdl file is:

mdlflA20

cmr
   "the camera"
   0.0 0.0 2.0  % cop
   0.0 0.0 -1.0 % vpn
   0.0 1.0 0.0  % vup
   0.035        % F
   0.035 0.035  % width height
   0.0 0.0      % center of image area
   0.0          % time
[
   fcsDstnc 2.035 end
   aprtr 1.8 end 
]
end

bckgrnd
  cnstnt
     rgb 1.0 1.0 1.0 end
  end
end

nmdMtrl "mat"
   lmbrtn  
       rgb 0.1 0.2 0.0 end
   end  
end

msh     
"" mtrlNm "mat" end
   vrtxPstn
     0.0 -1.0 0.5
     0.0  0.0 0.5
     -1.0  0.0 0.5
     -1.0 -1.0 0.5
   end
   vrtxUV
     1.0 0.0
     1.0 1.0
     0.0 1.0
     0.0 0.0
   end
   qdrltrl 
     0 1 2 3
   end  
end

msh     
"" mtrlNm "mat" end
   vrtxPstn
     1.0 0.0 -0.5
     1.0 1.0 -0.5
     0.0 1.0 -0.5
     0.0 0.0 -0.5
   end
   vrtxUV
     1.0 0.0
     1.0 1.0
     0.0 1.0
     0.0 0.0
   end
   qdrltrl 
     0 1 2 3
   end  
end

msh     
"" mtrlNm "mat" end
   vrtxPstn
     0.5 -0.5 0.0
     0.5  0.5 0.0
     -0.5  0.5 0.0
     -0.5 -0.5 0.0
   end
   vrtxUV
     1.0 0.0
     1.0 1.0
     0.0 1.0
     0.0 0.0
   end
   qdrltrl 
     0 1 2 3
   end  
end

Thinlens camera

Here are three green squares viewed through a thin lens camera


The mdl file is the same as above but these two lines are uncommented:

fcsDstnc 2.035  end
aprtr 1.8 end


Planar mesh



mdlflA20

cmr
   "the camera"
   5.0 5.0 12.0  % cop
   0.0 0.0 -1.0 % vpn
   0.0 1.0 0.0  % vup
   0.035        % F
   0.035 0.035  % width height
   0.0 0.0      % center of image area
   0.0          % time
end

bckgrnd
  cnstnt
     rgb 1.0 1.0 1.0 end
  end
end


nmdMtrl "mat"
   lmbrtn  
      rgb 0.3 0.1 0.1 end
   end  
end


plnrMsh     
"" mtrlNm  
"mat" end     
vrtxPstn
0.0 0.0 0.0
10.0 0.0 0.0
10.0 10.0 0.0
0.0 10.0 0.0
3.0 4.0 0.0
7.0 5.0 0.0
4.0 7.0 0.0
end     
cmplxPly
plygn   
0 1 2 3 end
plygn
6 5 4 end
end     
end