- To: Bill Hibbard <billh@xxxxxxxxxxxxx>
- Subject: Re: Projection matrix from two points
- From: Doug Lindholm <lind@xxxxxxxx>
- Date: Thu, 10 Feb 2005 13:19:50 -0700
Java 3D comes with the javax.vecmath package which has lots of matrix
manipulation methods.
http://java.sun.com/products/java-media/3D/forDevelopers/J3D_1_3_API/j3dapi/index.html Doug Bill Hibbard wrote:
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
-- *----------------------------------------------------------------------* | Doug Lindholm, Software Engineer | E-mail: lind@xxxxxxxx | | Unidata Program Center | Phone: 303-497-8659 | | UCAR Office of Programs | | | P.O. Box 3000 | There's no place | | Boulder, Colorado 80307-3000 | like $HOME | *----------------------------------------------------------------------*
- References:
- Re: Projection matrix from two points
- From: Bill Hibbard
- Re: Projection matrix from two points