Re: matrix projection control

Hi Christian,

> does anyone know where  I can find  the definition of the 16 coefficients of
> the matrix of a projection control?

DisplayImplJ3D uses the 4 x 4 matrices defined by Java3D,
which are described in:

http://java.sun.com/products/java-media/3D/forDevelopers/J3D_1_2_API/j3dguide/index.html

under Section 8.1.29 on Transform3D and Appendix A.2 on matrices.

The easy way to manipulate these matrices is using two static
methods of visad.java3d.MouseBehaviorJ3D:

  public static double[] static_multiply_matrix(double[] a, double[] b);

  public static double[] static_make_matrix(double rotx, double roty, double 
rotz,
         double scale, double transx, double transy, double transz);

The first multiplies two 4 x 4 matrices appropriately to compose
their view transforms, the second constructs a 4 x 4 matrix with
the given rotation angles (in degrees and around the various axes),
scale, and translations.

The only way to figure this out is to experiment with these.
See visad/examples/Test57 for a simple example.

> I am looking also for an example of drawing and animating trajectories
> of particles in 3d.

There are no current examples that I am aware of, but it is
certainly feasible.  The Aeri example at:

  http://www.ssec.wisc.edu/~billh/visad.html#aeri

analyzes wind data to generate "flags" that are a little like
trajectories.

A set of trajectories are a set of 1-D paths through 4-D space-time,
but for an animated display you'd want a 1-D sub-path at each time
step.  This would be a FieldImpl with MathType:

  (time -> Set(x, y, z))

displayed with ScalarMaps:

  time -> Animation
  x -> XAxis
  y -> YAxis
  z -> ZAxis

and where the Sets are UnionSets of Gridded3DSets with manifold
dimension = 1 (analogous to map outlines which are UnionSets
of Gridded2DSets with manifold dimension = 1).  Each Gridded3DSet
with manifold dimension = 1 would be the trajectory of one
particle, taken over a time interval:

  [current_time - trajectory_length, current_time]

and the UnionSet would be taken over the set of particles.
Note that current_time is just the time sample of the FieldImpl
(time -> Set(x, y, z)), and trajectory_length is just the time
interval represented by the instantaneous display of a
trajectory.

The system does need an example of such a trajectory display.
If you'd like to contribute one that would be great, otherwise
one of these days we will add one.

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html


  • 2000 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: