triangulation

box2d triangulation of static body

浪子不回头ぞ 提交于 2019-12-24 07:29:12
问题 I have posted on this before, but to no avail. Sorry for slightly repeating myself but I have tried to figure this out and I haven't been able to. I am probably not understanding something in box2d. I therefore wrote a very simplified example to highlight the issue. In my code I simply create a rectangle. I triangulate it and then I add it to a box2d world. If I define the object as a dynamic object (density > 0) it is reacting to the walls and objects within the scene see images here. If I

matplotlib unstructered quadrilaterals instead of triangles

牧云@^-^@ 提交于 2019-12-24 03:07:55
问题 I've two netcdf files containing both unstructured grids. The first grid has 3 vertices per face and the second has 4 vertices per face. For the grid containing 3 vertices per face I can use matplotlib.tri for visualization (like triplot_demo.py: import matplotlib.pyplot as plt import matplotlib.tri as tri import numpy as np xy = np.asarray([ [-0.101, 0.872], [-0.080, 0.883], [-0.069, 0.888], [-0.054, 0.890], [-0.045, 0.897], [-0.057, 0.895], [-0.073, 0.900], [-0.087, 0.898], [-0.090, 0.904],

CGAL: 2D Constrained Delaunay Triangulation - Adding information to constraints

强颜欢笑 提交于 2019-12-24 03:01:07
问题 It is possible to attach informations (like ints) to points before adding them up to the triangulator object. I do this since I need on the one hand an int-flag that I use lateron to define my texture coordinates and on the other hand an index which I use so that I can create a indexed VBO. http://doc.cgal.org/latest/Triangulation_2/Triangulation_2_2info_insert_with_pair_iterator_2_8cpp-example.html But instead of points I only want to insert constraint-edges. If I insert both CGAL returns

CGAL: Help getting triangles coordinates from Delaunay Triangulation

爱⌒轻易说出口 提交于 2019-12-23 13:08:56
问题 I'm new with CGAL, i'm sure my question is very simple. I am trying to use CGAL to do some Delaunay triangulation. I have a grid with N 3D points over a sphere and I want to triangulate the sphere using those points as the vertex of the triangles. I just need to get a list of the vertex of the resulting triangles like that: id_triangle1 vertex_1 vertex_2 vertex_3 id_triangle2 vertex_1 vertex_2 vertex_3 ....... I have done that to perform the triangulation: std::vector<Point> P; for(i=0;i

Constrained (Delaunay) Triangulation

人走茶凉 提交于 2019-12-23 04:59:12
问题 For a university project I need to implement a computer graphics paper that has been relased a couple of years ago. At one point, I need to triangulate the results I get from my simulation. I guess its easier to explain what I need looking at a picture contained within the paper: Let's say I already have got all the information it takes to reconstruct the contour lines that you can see in the second thumbnail. Using those I need to do some triangulation using those siluettes as constrains. I

CGAL Using Locate() to Find Cell on Triangulation Surface

丶灬走出姿态 提交于 2019-12-23 04:32:15
问题 Using CGAL, I have a 3D Delaunay Triangulation of a set of random points on the unit sphere, that I obtained via: Delaunay T(points.begin(), points.end()); Now, what I would like to be able to do is query T (using locate() or something like that) to find the three vertices of the surface facet that an arbitrary point (also on the unit sphere) is contained inside. When I use locate(), I get interior cells as results sometimes, which include the infinite vertex. I don't want any of these. I

Calculating distance of an AP including signal-to-noise ratio

与世无争的帅哥 提交于 2019-12-22 11:35:11
问题 For some reason a friend and myself were talking about calculating the distance between yourself (laptop, phone, etc.) and an AP based of the info you get from the devices (RSSI, freq, SNR, etc...). So, after spending sometime researching about trilateration, triangulation, and free-space path loss. (with the help of some blog posts and wiki) I was able to get a distance in meters from the AP to my laptop and the results were a lot better then what I thought they would be. Whenever I'm in the

How can I determine my position by triangulation on known routers?

纵然是瞬间 提交于 2019-12-22 08:36:28
问题 Is there any open source software available? Basically, I just want to triangulate based on signal strength of routers whose location is fixed and known. I realize there can be cases of interference, but let's just stick to listing known source code. Thanks. 回答1: I found this solution: http://redpin.org They offer you for free for iOS and Android platforms. All sources you can download an look at. There bunch off documentation and other staff to help you with 回答2: I don't know of any

CGAL - custom 2D point and intersection behavior in constrained delaunay triangulation

China☆狼群 提交于 2019-12-21 20:37:48
问题 In short, I have to generate a constrained delaunay triangulation from a set of 2D points that carry additional information. Since there could be intersecting constraints, I need that the triangulation properly interpolates the satellite data whenever it generates the new point of intersection. I tried with CGAL (C++) to define a custom kernel following the example here, but I've failed to compile it succesfully, basically because there is something fundamental of the underlying generic

Triangulate a set of points with a concave domain

瘦欲@ 提交于 2019-12-21 12:14:14
问题 Setup Given some set of nodes within a convex hull, assume the domain contains one or more concave areas: where blue dots are points, and the black line illustrates the domain. Assume the points are held as a 2D array points of length n , where n is the number of point-pairs. Let us then triangulate the points, using something like the Delaunay method from scipy.spatial: As you can see, one may experience the creation of triangles crossing through the domain. Question What is a good