找到一组圆形的点上搭着一个三维高程图 [英] Find a set of points of a circle draped on a 3D height map

查看:164
本文介绍了找到一组圆形的点上搭着一个三维高程图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有N×N的值的高度图。

I have a height map of NxN values.

我想找到,给定一个点A(红点),其x和y坐标,给出(和z是从数据已知,所以A是表面的顶点)的一组位于点上叠加上由数据点所描述的假想面的圆A和中心半径R是一个圆形布(灰色)的良好近似的周长。

I would like to find, given a point A (the red dot), whose x and y coordinates are given (and z is known from the data, so A is a vertex of the surface) a set of points that lie on the circumference of the circle with center in A and radius R that are a good approximation of a circular "cloth" (in grey) draped on the imaginary surface described by the data points.

采样,我想找到点集之间的相互距离,并不需要是一致的,但我仍想找到至少一切在的边缘的交叉点网与圆的距离R从A

The sampling, the reciprocal distances between the set of points that I am trying to find, doesn't need to be uniform, but still I would like to find at least all the points that are an intersection of the edges of the mesh with the circle at distance R from A.

如何找到这个点的集合?

How to find this set of points?

这是一个已知的问题?

- 修改

这扬正在使用的假设是正确的:将样品形成规则矩形或方形网格(在XY平面)与[0,0]对齐。不过,我想借此位移在Z方向考虑在内来计算距离。你可以看到高度图作为地形,我正在寻找的说明,给探险家说,旅游只是在给定的经纬度路径的算法,标记是在从A步行距离距离R点,即考虑到所有迄今所做Z轴的位移。探险攀登和在山谷过下去。

The assumption that Jan is using is right: the samples form a regular rectangular or square grid (in the X-Y plane) aligned with [0,0]. But I would like to take the displacement in the Z direction into account to compute the distance. you can see the height map as a terrain, and the algorithm I am looking for as the instructions to give to an explorer that, traveling just on paths of given latitude or longitude, mark the points that are at distance R from A. Walking distance, that is taking into account all the Z displacements done so far. The explorer climbs and go down in the valleys too.

在琐碎的算法,这将是这样的。我们知道,给定的R,在x和y轴的最大位移对应于完全平坦的表面。如果没有坡度,X,Y点都将在边界广场斧R< X - LT; AX + R和Ay-R

目前这一点上,它将开始行进到接近的细胞,因为如果周长进入电网中的一个小区的边缘,它也必须退出该细胞

The trivial algorithm for this would be something like this. We know that given R, the maximum displacement on the x and y axis corresponds to a completely flat surface. If there is no slope, the x,y points will all be in the bounding square Ax-R < x < Ax+r and Ay-R

At this point, it would start traveling to the close cells, since if the perimeter enters the edge of one cell of the grid, it also have to exit that cell.

推荐答案

我认为这将是相当困难的解决一个确切的方式,所以我会建议尝试模拟路径的简单的方法,你的探险家将采取上的表面上。

I reckon this is going to be quite difficult to solve in an exact fashion, so I would suggest trying the straightforward approach of simulating the paths that your explorers would take on the surface.

由于您的出发点 A 和旅行距离 D ,计算积分 P XY平面是 D A

Given your starting point A and a travel distance d, calculate a circle of points P on the XY plane that are d from A.

有关每个 P P 的,交叉的线段您的网格,使您最终获得一个序列点所在的探险家从一个方格跨越到下的顺序,这会发生,如果在资源管理器从 A 。这些点应该再给予通过插值从网格数据z坐标。 您可以通过这个点序列从而推进和跟踪走了这么远的距离。最终目标距离必达 - 调整 P 来在这一点

For each of the points p in P, intersect the line segment A-p with your grid so that you end up with a sequence of points where the explorer crosses from one grid square to the next, in the order that this would happen if the explorer were travelling from A. These points should then be given a z-coordinate by interpolation from your grid data. You can thus advance through this point sequence and keep track of the distance travelled so far. Eventually the target distance will be reached - adjust p to be at this point.

P中就包含您正在寻找的周长。根据您的需要调整采样保真(的 P 尺寸)。

P now contains the perimeter that you're looking for. Adjust the sample fidelity (size of P) according to your needs.

这篇关于找到一组圆形的点上搭着一个三维高程图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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