Re: [GRASS-user] 3-D plane workflow

2013-03-03 Thread Adam Dershowitz
Thanks very much.
That is just what I had in mind. Is it then possible to convert that to a 
raster elevation to use for some height calculations?

--Adam


-Original Message-
From: Anna Kratochvílová [kratocha...@gmail.commailto:kratocha...@gmail.com]
Sent: Saturday, March 02, 2013 09:12 AM Pacific Standard Time
To: Adam Dershowitz
Cc: GRASS user list
Subject: Re: [GRASS-user] 3-D plane workflow


On Wed, Feb 27, 2013 at 12:38 AM, Adam Dershowitz
adershow...@exponent.com wrote:
 I would like to be able to put some surfaces in the space over a DEM.  In
 other words, I have a DEM, and then I need to calculate some regions that
 are keep-out zones in space above.  I can calculate where these surfaces
 are fairly easily in Python, for example.  So the output of my calculation
 would be some points.  In the easiest example, it would just be 4 sets of
 x,y,z that represent the four corners of a plane.
 I would then like to be able to visually show this plane (or multiple
 planes), over the DEM, and show that the DEM does, or doesn't, penetrate
 this surface.  If it does penetrate, I would like to be able to calculate
 the penetration height.

 The kind of thing that I would like to do, would end up looking like the
 examples of Slovakia precipitation that Mitasova has done.  Some of those
 examples show a DEM, and then a surface that is being penetrated by the DEM.
 I have been reading some of the examples for 3D visualization (such as here:
 http://grasswiki.osgeo.org/wiki/Help_with_3D), but figured that a post here,
 but might get me a little more guidance about a general suggested workflow.

 In those examples, are the isosurfaces does as 3D rasters?  If I just want a
 plane in space, and I have the four corner points, is a 3D raster seem like
 the best way to draw it?  Are those examples displayed with NVIZ or
 paraview?

 Is the following a reasonable approach:

 Calculate the surfaces in some code and export as faces:

 F 4
  0 100 10
  50 50 80
  0 0 10
  0 100 10

 Then, import into Grass with v.in.ascii.
 Next, I would have to convert to a raster:  v.to.rast.
 Then, I would have to convert to an elevation:  r.to.rast3elev
 Finally, I could export both the surfaces and the ground DEM with
 r3.out.vtk, and visualize with paraview.

 Is this a reasonable workflow?  If I just need a semitransparent surface, is
 it necessary for it to be 3D, or can it be done with 2.5D (all I really need
 is x,y and elevation, like a DEM).  For, example, I might be able to just
 skip the raster version and use v.out.vtk?Or maybe I can just use nviz
 to visualize what I need, if I can get it to the right format.
 If I do convert the plane to a raster, I suppose I can then use mapcalc to
 calculate the height difference between the plane and the ground DEM?

 I am just looking for some general workflow guidance for a good overall
 approach to get going.  It seems like there are some things that are not as
 clear about 3D work in GRASS, and I am just trying to get a reasonable
 picture.
 Any thoughts are greatly appreciate.

 Thanks much,



Hi Adam,

I am not sure if this is exactly what you want but have a look at the
attached screenshots. This is done in wxNviz. I created a plane (3
points) with

v.in.ascii -n input=inputFile.txt output=out format=standard separator=   z=3

The file containes what you already used (F 4 ...). Then you can
display it in 3D view. However, the transparency of the surface is not
working well together with the vector (note to developers: the same
issue is in old nviz). You can play with using wire style as in the
screenshot. If it is not clear, just ask for more details.

Regards,
Anna
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] 3-D plane workflow

2013-02-26 Thread Adam Dershowitz
I would like to be able to put some surfaces in the space over a DEM.  In other 
words, I have a DEM, and then I need to calculate some regions that are 
keep-out zones in space above.  I can calculate where these surfaces are 
fairly easily in Python, for example.  So the output of my calculation would be 
some points.  In the easiest example, it would just be 4 sets of x,y,z that 
represent the four corners of a plane.
I would then like to be able to visually show this plane (or multiple planes), 
over the DEM, and show that the DEM does, or doesn't, penetrate this surface.  
If it does penetrate, I would like to be able to calculate the penetration 
height.

The kind of thing that I would like to do, would end up looking like the 
examples of Slovakia precipitation that Mitasova has done.  Some of those 
examples show a DEM, and then a surface that is being penetrated by the DEM.
I have been reading some of the examples for 3D visualization (such as here: 
http://grasswiki.osgeo.org/wiki/Help_with_3D), but figured that a post here, 
but might get me a little more guidance about a general suggested workflow.

In those examples, are the isosurfaces does as 3D rasters?  If I just want a 
plane in space, and I have the four corner points, is a 3D raster seem like the 
best way to draw it?  Are those examples displayed with NVIZ or paraview?

Is the following a reasonable approach:

Calculate the surfaces in some code and export as faces:

F 4
 0 100 10
 50 50 80
 0 0 10
 0 100 10

Then, import into Grass with v.in.ascii.
Next, I would have to convert to a raster:  v.to.rast.
Then, I would have to convert to an elevation:  r.to.rast3elev
Finally, I could export both the surfaces and the ground DEM with r3.out.vtk, 
and visualize with paraview.

Is this a reasonable workflow?  If I just need a semitransparent surface, is it 
necessary for it to be 3D, or can it be done with 2.5D (all I really need is 
x,y and elevation, like a DEM).  For, example, I might be able to just skip the 
raster version and use v.out.vtk?Or maybe I can just use nviz to visualize 
what I need, if I can get it to the right format.
If I do convert the plane to a raster, I suppose I can then use mapcalc to 
calculate the height difference between the plane and the ground DEM?

I am just looking for some general workflow guidance for a good overall 
approach to get going.  It seems like there are some things that are not as 
clear about 3D work in GRASS, and I am just trying to get a reasonable picture.
Any thoughts are greatly appreciate.

Thanks much,


--Adam
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] 3-D plane workflow

2013-02-26 Thread Hamish
Adam wrote:
 I would like to be able to put some surfaces in the space over
 a DEM.

in NVIZ, add a new raster surface, and set the map to a constant
value instead of a map name. You can either change the value of
the constant or the z-position offset to move it around.

For a finite surface area, use r.plane or like
  r.mapcalc constmap = 100
and load a second raster surface in NVIZ's raster controls.
You can also set its transparency level to make it translucent
for a nice see-through effect.

3D vector faces may work as well, but they are not as mature.


Hamish

ps- Helena/Carla: re. the shading I think there is some bug in
at least tcl/tk NVIZ where one of the light sources (the direct
one?) gets turned off and does not go back on. the only way back
is to save the state and restart NVIZ.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] 3-D plane workflow

2013-02-26 Thread Adam Dershowitz




On 2/26/13 9:56 PM, Hamish hamis...@yahoo.com wrote:

Adam wrote:
 I would like to be able to put some surfaces in the space over
 a DEM.

in NVIZ, add a new raster surface, and set the map to a constant
value instead of a map name. You can either change the value of
the constant or the z-position offset to move it around.

That won't do what I need.  The problem is that the planes I want are
finite and not horizontal.  Instead they are polygons where I have the
corner points defined.  For example, just picture an arbitrarily oriented
square floating in space over the DEM based ground.



For a finite surface area, use r.plane or like
  r.mapcalc constmap = 100
and load a second raster surface in NVIZ's raster controls.

I suppose I could calculate out the dip and azimuth for r.plane, or the
equivalent equations for r.mapcalc.  Then, I would need to  generate a
mask as well.  
Another thought that I had was to import the points as vectors, then to
use r.surf.nnbathy to generate the raster surface values.


You can also set its transparency level to make it translucent
for a nice see-through effect.

3D vector faces may work as well, but they are not as mature.


Hamish

ps- Helena/Carla: re. the shading I think there is some bug in
at least tcl/tk NVIZ where one of the light sources (the direct
one?) gets turned off and does not go back on. the only way back
is to save the state and restart NVIZ.


Thanks for the info.  It is helpful.

--Adam

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user