Re: 3D Trajectories (beginner)

Hi Hugo,

To draw the trajectory as a curve in 3-D, you need a FlatField
with MathType ((x, y, z) -> time) and with domain Set that is a
Gridded3DSet with manifold dimension = 1.

Note that the VisuTraj.java program in the visad/examples
directory does something a lot like this, except:

1. It has multiple trajectories.
2. It uses Gridded3DSets with manifold dimension = 1 instead
   of FlatFields (these Gridded3DSets could be the domains of
   FlatFields if you needed time or some other dependent
   variables).
3. It animates trajectories, but does not color them.

Good luck,
Bill

On Thu, 17 Feb 2005, Hugo Heden wrote:

> Good day all!
>
> Just started trying VisAD out a few days ago, and I'm a little stuck..
>
> I can't figure out (from the tutorial, mailing list archives or other
> doc) how to plot a 3D-trajectory (using the VisAD-Java-libraries)
>
> time -> (x, y, z)
>
> Ideally I would want to animate the trajectory, or show the time by
> means of colors. (Also, I want to add a widget, to let the user control
> the time variable.) I have tried something like the code below, but that
> gives me the trajectory as (nicely colored) *points*, but I would want a
> *continuous* function.. I realize that there is something fundamental
> I've been missing here.. Could anyone point me in the right direction? I
> found an intresting mailing list post on
> http://my.unidata.ucar.edu/content/staff/russ/visad/msg01230.html , but
> I couldn't figure out how to implement that..
>
> Best regards
> Hugo Heden
>
>
>     // ....
>     RealTupleType rangeTupleType = new RealTupleType( xType, yType, zType );
>     RealType timeType = RealType.getRealType( timeString );
>     ScalarMap timeMap = new ScalarMap( timeType, Display.RGB );
>     display.addMap( timeMap );
>
>     FunctionType t_to_xyz_funcType = new FunctionType( timeType,
> rangeTupleType );
>
>     float[][] timeVals = new float[1][ timeValues.length ];
>     timeVals[0] = timeValues;
>     Set timeSet = new Gridded1DSet( timeType, timeVals, timeValues.length );
>     FlatField vals_ff_1 = new FlatField( t_to_xyz_funcType, timeSet );
>     // ....
>
>