cgal

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 Visibility computes wrong visibility polygon (Simple Polygon Visibility algorithm)

只谈情不闲聊 提交于 2019-12-24 00:54:54
问题 I have to compute the visibility polygons of some vertices of a given polygon. I'm using CGALs visibility computation library, but for this example polygon and its 35th vertex (and a few more points), the following (obviously wrong) result is computed, where one edge of the visibility polygon intersects an edge of the original one. I used the following code for construction: typedef CGAL::Arrangement_2<CGAL::Arr_segment_traits_2<Epeck>> Arrangement_2; Arrangement_2 polygon_arr; CGAL::insert

CGAL: Transformation Matrix for Rotation given two lines/vectors/directions

╄→гoц情女王★ 提交于 2019-12-24 00:39:42
问题 How do I generate a transformation matrix for rotating points/others by the angle between two lines/vectors/directions in CGAL? 2D is what I need. 3D is what I love. 回答1: According to the manual you have these tools to work with: Aff_transformation_2<Kernel> t ( const Rotation, Direction_2<Kernel> d, Kernel::RT num, Kernel::RT den = RT(1)) approximates the rotation over the angle indicated by direction d, such that the differences between the sines and cosines of the rotation given by d and

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

CGAL Mesh(es) intersection/collision

不羁的心 提交于 2019-12-22 20:43:07
问题 I would like to have a collision detection module in my tracking pipeline, detecting when two different meshes collide/interpenetrate or if there is a self-penetration of an articulated mesh. Based on the depth of the penetration there should be a penalization that combats this phenomenon. I should get a list of the colliding faces/vertices in order to do so. After examining several options, I decided to start working with CGAL. In this link there is an interesting answer pointing to some

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

setup.py check if non-python library dependency exists

旧街凉风 提交于 2019-12-21 17:06:32
问题 I'm trying to make a setup.py for cgal-bindings. To install this, the user needs to have at least a certain version of CGAL. In addition, CGAL has a few optional targets that should be built if the user has some libraries (like Eigen3). Is there a cross-platform way in Python to check for this? I can use find_library in ctypes.util to check if the library exists, but I don't see any easy way to get the version . <-- This doesn't actually work all the time, some libraries are header-only like

Is clang's c++11 support reliable?

此生再无相见时 提交于 2019-12-21 12:42:56
问题 I ran into an interesting issue when trying to mix clang (Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn, Target: x86_64-apple-darwin14.0.0), c++11 and CGAL (via MacPorts). It seems that whether or not I call std::vector<>::reserve will determine whether my program will even compile. I've trimmed down the problem into a minimal example (as minimal as CGAL examples get): #include <vector> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/AABB_tree.h>