Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Re: placing polylines/polygons exactly on a surface?
Hello Weihua, I supose the elevation of your surface and your roads are not exactly the same, because this the road is sometimes over/under the surface. One solution can be using the DEPTH_TEST_DISABLE in your road polygon. This makes your roads will be drawn on top of other objects. Also, from your road coordenates you can calcula the correspondiing points and paint it with a different color. I hope this will be useful for you. Bye. Weihua FANG wrote: > Hi, all > > A 3D visualization of roads is to be created with 3 types of data: > a) elevation data: elev(m,m): a 2 dimensional array > b) a satellite image for texture: image_sate (m, m): a 2-dimensional > array > c) road lines, road_vertex (3, n, n): a 3-by-n floating-point array > representing a 3-D vertex > > I did it by the following steps: > 1) created an IDLgrSurface Object and set DATAZ property to elevation > array > 2) set the texture of the surface to the satellite image array > > things worked fine till now. > > 3) created an IDLgrPolyline Object and set the DATA property to > road_vertex. > > the road line is not exactly on the surface. Some parts of the line > are over and the rest are inner the surface. > > I am wondering, how to place polylines or polygons exactly on a > surface? I found IDLgrContour object can display contours on a surface > quite well though. > > Can someone please give me some hints? > > Thanks a lot. > > Fang > -- ----------------------------------------------------- Antonio Santiago Pï¿½rez ( email: santiago<<at>>grahi.upc.edu ) ( www: http://www.grahi.upc.edu/santiago ) ( www: http://asantiago.blogsite.org ) ----------------------------------------------------- GRAHI - Grup de Recerca Aplicada en Hidrometeorologia Universitat Politï¿½cnica de Catalunya -----------------------------------------------------
hi, Antonio, Your solution works well to my application. thanks. :-) Weihua