在 ParaView 中显示高程网格 [英] Displaying an Elevation grid in ParaView

查看:19
本文介绍了在 ParaView 中显示高程网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 ParaView 的新手,完全迷失了所有不同的数据格式.我要做的就是显示一个由程序生成的高程网格.我将高程网格存储在由 xy 坐标索引的二维浮点数组中,并存储 z 坐标.换句话说,elevationGrid[x][y] 存储点 (x, y) 上方的高度.

I'm new to ParaView and completely lost with all the different data formats. All I want to do is display an elevation grid which is produced by a program. I store the elevation grid in a two dimensional array of floats which is indexed by x and y coordinates and stores the z coordinate. In other words elevationGrid[x][y] stores the height above the point (x, y).

我应该使用哪种文件格式以及它是如何定义的?如果有人可以提供一个示例文件,例如 3x3 网格,那将是理想的.

Which file format should I use for this and how is it defined? It would be ideal if someone could give an example file for, say, a 3x3 grid.

推荐答案

第一种方法,使用 5x5 网格和方程 z = x^2+y^2,使用非常简单的输入格式.这是一种通用方法,并不特别适用于结构化网格.Paraview 3.14.1 已完成以下操作.

A first approach with a 5x5 grid and equation z = x^2+y^2, using a very simple input format. This is a general approach, not especially dedicated to structured grid. The following has been done with Paraview 3.14.1.

"x","y","z"
-0.5,-0.5,0.5
-0.30000001,-0.5,0.34000001
-0.1,-0.5,0.26
[...]
0.1,0.5,0.26
0.30000001,0.5,0.34000001
0.5,0.5,0.5

2) 在 Paraview 中打开您的 csv 文件

填写所需的导入选项.

2) Open in Paraview your csv file

Fill the required import options.

应用过滤器 >按字母顺序 >表到点

Apply Filters > Alphabetical > Table to points

您将被要求为每个坐标提供每个变量.

You will be asked to give each variables for each coordinates.

创建一个新的可视化视图(添加一个新选项卡)并选择3D 视图".在管道中单击其名称附近的小眼睛,激活您的 TableToPoints 过滤器.

Create a new visualization view (add a new tab) and choose "3D View". Activate your TableToPoints filter clicking on the little eye near its name in the pipeline.

如果一切正常,此时您将看到散点图.

If evething is okay, at this point you will see your scatter plot.

应用过滤器 >按字母顺序 >Delaunay 2D

Apply Filters > Alphabetical > Delaunay 2D

并使用默认选项,最终获得:

And using default options, one finally obtains:

我记得创建高程图的专用函数的名称...它是 Wrap by scalar 函数.您可以将其与上述一些步骤结合起来,以更轻松地获得您想要的东西.如有必要,我可以举个例子.

I remember the name of the dedicated function to create elevation map... It is the Wrap by scalar function. You can combine it with some above steps to get more easily what you want. I could give you an example if necessary.

这篇关于在 ParaView 中显示高程网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆