Subject: Re: CCL:Orthographic projections in VMD: SUMMARY

From: Erik Evensen <[email-masked]>
Date: Tue, 20 Mar 2001 05:24:59 -0800 (PST)

On Mon, 19 Mar 2001, Devapriya Choudhury wrote:

>
>
> Hi All,
>   Thanks to Barry Israelevich for the quick reply. Although in Raster3D
> there are no explicit camera position or zoom variables. But I think I
> managed to do that by tweaking the global X-form matrix.
>  Come to think of it, it would be nice if once the
> orthographic/perspective projections are set, the same be taken into
> account while generating the ray-tracer input file.
>
> Thanks once again.
> Devapriya
>
> Original question:
> >
> > Hi All,
> >   When I generate a picture in VMD using the Orthographic projection mode
> > and subsequently render the image (Raster3D), the view seems to
> > automatically shift to perspective projection mode.
> >  Does anyone know a fix ?
>
> ----Replies---------------------------------------------
> (1) From: Barry Isralewitz <[email-masked]>
>         A near-perfect way to simulate orthographic coordinates with
> any raytracing program (such as Raster3D) is: move the camera far
> back, increase the zoom appropriately.  Most raytracing programs have
> these two paramaters early in their input files (written by VMD), so
> just alter the settings, then re-run the ouput file (i.e. plot.r3d)
> through the renderer.
>
> (2) From: Adrian E. Roitberg <[email-masked]>
>  would love to know the answer to that one !
> THe same thing happens with povray...
>

povray supports orthographic projections, you can get an orthographic
projection by changing the camera portion of the povray input file to look
something like this:

camera {
  orthographic
  location  <0.000000, 0.000000, -2.000000>
  look_at   <-0.000000, -0.000000, 2.000000>
  up <0.0000, 2.0000, 0.0000>
  right <2.666666, 0.0000, 0.0000>
  direction <0, 0, 0.8>
  sky <0.000000, 1.000000, -0.000000>
}

Note that you have to tweak out the 'up' and 'right' vectors to get the
image sizing correct, but be sure to maintain the aspect ratio.  You can
also do a lot with lighting by changing the header and material types in
pov file.  You can a lot more information at povray.org, specifically,
documentation for povray is in
http://povray.org/ftp/pub/povray/Official/Docs/

Hope this helps...

Erik Evensen, Ph.D.
DuPont Pharmaceuticals Research Labs
San Francisco, CA