Re: Question about road display

On Tue, 14 Jan 2003, Jing Zhang wrote:

> Thank you for your soon reply.  I just wonder if there is another way I
> can draw the road.
>
> For example:
>
> I draw the road (2D line) on X-Y plane and then project it to the 3D
> terrain.

But the Z (height) information has to come from somewhere.
I think your original approach is good.

However, there is an easier way than a lot of calls to
evaluate. Given a FlatField terrain with MathType
((x, y) ->z) and a Gridded2DSet roads with manifoldi
dimension = 1 with MathType Set(x, y), you can create
a FlatField for your roads with the call:

  Field terrain_roads = terrain.resample(roads);

Good luck,
Bill

> >From: Bill Hibbard
> >To: Jing Zhang
> >CC: visad-list@xxxxxxxxxxxxx
> >Subject: Re: Question about road display
> >Date: Sun, 12 Jan 2003 20:36:30 -0600 (CST)
> >
> >Hi Jing,
> >
> > > I 've successfully created 3D terrain by using Visad. Now, I want to
> draw
> > > a road on 3D terrain. The road will be realized by drawing line
> between
> > > vector point.(Here, I'm going to use Gridded3DSet) But the vector
> point
> > > information that I readed from a special file(VMAP) only includes X
> and Y
> > > value, no Z value(elevation value). How can I draw the road up and
> down
> > > along with the 3D terrain.(Not just float on the 3D terrain) If I can
> get
> > > Z values from the 3D terrain according to X,Y values, I may can draw
> a
> > > road as what I thought. But I have no idea about how to retrive Z
> values
> > > from the 3D terrain.
> > > If you can give me any suggestion, I will be very thankful.
> >
> >If you have an (x, y) value in a RealTuple, and your terrain
> >in a FlatField with MathType ((x, y) -> z), then you can get
> >the z value by passing the RealTuple to the evaluate(RealTuple)
> >method of the FlatField.
> >
> >Good luck,
> >Bill
>
> ________________________________________________________________________________
> Help STOP SPAM: Try the new MSN 8 and get 2 months FREE*
>


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