Picky mathematical points with vtkCamera

David Gobbi dgobbi at irus.rri.on.ca
Mon Apr 17 21:24:37 EDT 2000


On Mon, 17 Apr 2000, Ken Martin wrote:

> David Gobbi wrote:
> 
> >Using vtkCamera::SetWindowCenter() in conjunction with
> >ParallelProjection.  The code used to shear the view volume,
> >I changed it so that it translates the view volume instead.
> >This seemed much more in line with what happens when
> >SetWindowCenter is used with with perspective views.
> >
> >However, I think that SetWindowCenter was originally meant
> >as a counter-intuitive (IMHO) method for creating oblique
> >projections.  So what I thought was an error in the VTK code
> >probably wasn't.
> >
> >So, any opinions?  Should the result of using
> >vtkCamera::SetWindowCenter() with a parallel projection
> >be to shift the view volume, or to shear it?
> 
> I never considered WindowCenter with a parallel projection although it is 
> perfectly reasonable. It should not perform a shear with a parallel 
> projection, only perspective. A common application of window center is for 
> rendering to multiple screens such as a power wall. In such cases a 
> parallel projection should result in a translation. For perspective, it is 
> a shear and an off axis projection.  Window center is essentially the same 
> as CW in Foley vanDam. The intent of WindowCenter is to support off axis 
> projections required for proper stereo rendering (with a shared view 
> plane), power wall, etc.
> 
>   - Ken

Glad you agree.  Foley & van Dam perform the same shear in parallel
projections as is used for perspective -- that is probably why the
parallel-projection shear originally appeared in the VTK code. 

I'll put together a regression test to guard against it being changed
back.

 - David

P.S. If anyone really is interested in doing oblique projections (any 
     architects, cabinetmakers, or machinists among us?), perhaps it 
     would be an idea to allow people to create their own 4x4 matrices
     for vtkCamera to use.  Unfortunately this would not be an easy
     thing to change.

--
  David Gobbi, MSc                    dgobbi at irus.rri.on.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list