Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: Projection matrix from two points

Hi Jeff,

> We're playing around with flythroughs in the IDV and I am trying to figure
> out (I am particularly brain dead trying to think in 3D) how to
> create a projection matrix from two points, (x1,y1,z1) (x2,y2,z2)
> such that the camera position is at the first point and the point of view
> is towards the second point.
>
> Any ideas?

Yeah, this stuff is a mess. Check out the article at:

  http://www.makegames.com/3drotation/

If you scroll down to "The Problem", there is an example
of building a matrix if you are standing at the point
(-1, 0, 1) and facing the point (-2, 0, 2). Note VisAD
includes some simple matrix manipulation methods in
visad/java3d/MouseBehaviorJ3D.java that may be useful.

Please let us know if this continues to be a problem.

Good luck,
Bill


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690