Mesh triangulation and simplification C++ library [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 months ago.
Improve this question
I am looking for a C++ library to triangulate and simplify 3D mesh. My 3D meshes are potentially huge (around 3 millions vertices). It should ideally be open source. Any idea?

Here are some libraries I found:
1) CGAL
++ Does a lot of things;
-- Licensing issues;
2) GTS
++ Open source and quite easy to use;
-- Does less that CGAL
anymore ideas?

vcglib (http://www.vcglib.net) is a open source c++ mesh processing library that offers high quality simplification.
vcglib is the library behind MeshLab (http://www.meshlab.net) so if you find some mesh processing feature in meshlab you will probably find that feature in the vcglib

I am looking for a C++ library to triangulate and simplify 3D mesh.
In addition to the libraries suggested in other answers, I would suggest looking at open-source MeshLib C++ library, which contains very fast and precise decimation functions, see documentation. The implemented algorithm there is based on Surface Simplification Using Quadric Error Metrics article with several improvements and optimizations.
My 3D meshes are potentially huge (around 3 millions vertices).
On top of that, there is a parallel version of mesh simplification specially tailored for such huge meshes. It splits the surface on smaller parts, decimates them concurrently, then merges them again, and decimates the triangles near part boundaries to avoid any visible seams, see MR::decimateParallelMesh() function.

Related

Heat Conduction 2D Fourier libmesh / deal.II [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
are there any examples of solving heat conduction problems in 2D with fourier's law as main equation with finite elements and using either libmesh or deal.II libraries?
The 2D heat equation is the only way to solve heat conduction problems. Lots of examples using finite difference, finite element, and boundary element methods. All require meshes of some kind. Which one do you want to apply?
OK, so now we know you want to solve 2D heat conduction problems using FEA. It's a three step process:
Pre-process (create the mesh for your geometry, apply material properties, boundary conditions, and initial conditions (if transient or non-linear).
Perform the analysis (formulate and solve the matrix equations for node and element unknowns).
Post-process (graphical display of results is best, since pictures are worth thousands of words).
Which solver do you wish to use? Is your objective to write one or just use one? Do you want open source? Must it be written in C++? (Not likely. FORTRAN is by far the most common language for such programs.)
Is yours a large problem? I'm guessing no, but massive parallelization might be of interest to you:
http://www.cas.usf.edu/~cconnor/parallel/2dheat/2dheat.html
FEMHub likes Python, probably because of the nice libraries NumPy and SciPy.
Here's a site that lists open source libraries for Java.

How would one approach creating a morphable 3D model? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
A Morphable Model for the Synthesis of 3D Faces
The above video is over 12 years old. How was the software done?
I need something way simpler but basically the same: a morphable model (thorax) that can be altered after being pre-morphed using a picture.
Any links that might provide useful information are appreciated.
Are there any open source projects that might have helpful code that could be studied?
The details are all in their paper:
www.mpi-inf.mpg.de/~blanz/html/data/morphmod2.pdf
In short, you need:
A collection of complete 3D scans of samples of the object class you want to characterize
A way of performing 'non-rigid registration' to align a reference template to each sample
Standard statistical analysis (principal components) of the aligned samples
Note that their choice of the name 'Morphable Model' is misleading. They are referring to something much more specific than a set of difference morphs or morph targets.
What you need is called Morph target animation. Blender implements this, but the feature is called Shape Keys.
You can see an example of morphing at NeHe Productions.
This process works by creating a base vector of points, such as a face and a set of change vectors that contain the differences to various morph targets. A possible morph target would be smile and it would contain the offset values that added to the original face would result in a smiling face.
You can do linear combinations of morph targets and you can even create caricatures, by exaggerating the factors (original + 2*smile).

Visualising 4D objects in OpenGL [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Do you know of any, actively developed, C/C++ library that can take a bunch (preferably a large amount) of 4D vertices, project them back into 3D space with respect to some arbitrary "4D camera" projection matrix and output regular 3D vertices that I could feed into OpenGL for hardware accelerated visualisation? I'd also need the ability to perform standard transformations in 4D space (translation, rotation along all 4 axes and uniform scaling).
The following is a poor answer (since I am by no means an expert on the topic), but I decided to take a quick peek around and came up with this thesis: http://steve.hollasch.net/thesis/#chapter4
Projection of a 4D object into 3-space is, as you would expect, a simple extension on the projection of 3D into 2-space, and the above thesis demonstrates different kinds of projection from 4D to 2-space. The code samples are in C, so it should be easy to follow.
Professor Andrew Hanson (Indiana University) developed a graphics library for visualizing 4D geometry. It's called GL4D. It's designed to mimic the feel of OpenGL (though I'm not sure whether it is actually built on top of OpenGL). It is GPU-accelerated. It supports projection, slicing, hidden-surface removal, per-voxel lighting, and semi-transparent shading.
Here's the publication which explains GL4D: GL4D paper
Here's a link to the source code: GL4D Source Code
And here's a video demonstration of GL4D: GL4D Video Demonstration

C/C++ Library for dynamic graphs? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm looking for a library to operate on dynamical graphs. I have a simulation where I must repeatedly calculate the average geodesic length for a graph after doing some changes in its structure (adding and deleting edges, on an undirected graph, all edges have the same weights).
I was using a quick C++ wrap over igraph that I made. igraph is for static graphs, so I was recalculating the geodesic distances from scratch every time I changed the graph. It's a monte carlo simulation, so I must do this millions of times to recover some statistics. It's starting to get real slow.
So I looked for libraries with algorithms for dynamical graphs, that could recalculate just update the average length after I delete or add an edge. I found some papers on the subject, but I'm really no specialist (I'm just a physicist, I'm just incidentally using graphs on a problem... I have almost no knowledge of data structures and algorithms) so I can't even read the papers, let alone implement the algorithms.
I found this library LEDA (http://www.algorithmic-solutions.com/leda/) which seems to have a dynamic graph extension, but it seems to be unmaintained (the links to download the free version are broken) and it's proprietary.
Are there any alternatives? I'm looking for C/C++ libraries. Maybe Haskell if I must, and I'm absolutely desperate.
Since you're doing Monte Carlo anyway, I assume that it would be acceptable to approximate the average shortest-path length. At each step, you could sample a handful of nodes and report the average shortest-path length for paths starting at one of those nodes, which has the same expectation and hopefully reasonable variance.
Alternatively, reference [3] of the JACM paper you mentioned on dynamic shortest-paths is an experimental study from 2004; perhaps the authors would let you use their code.
I know this late, but have you looked at LEMON?
Have you looked at Boost Graph Library
I haven't used it myself, but as part of Boost you can expect it to be very high quality, but it will demand a measure of C++ expertise.

What would be a good library to draw to the screen in c++? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I am creating simulation that models how an gas behaves in a container. I have collision checking set up, however I would like to draw the data on screen to make sure it is working correctly
All I need is a simple way to draw simple shapes such as circles to the screen using c++. these shapes do not have to look great, just function.
I may want to move my simulation from 2D to 3D in the future as well - so a library that has 3D capabilities would be good.
Remember I will be looping through and drawing several hundred gas molecules, so fast would also be good.
I am fairly new to c++ as a language so go easy. My IDE/compiler is VS 2010 Professional.
I have already used google - but I can not find any good installation guide for installing the library. So an installation guide would be a big plus
Look at SDL with SDL_gfx. You can then switch to SDL/OpenGL to do 3D.
I would recommend OpenGL, it's easy to use for your task. Also it's cross-platform and you can easily switch to 3D.
OpenGL is one possibility, though there are also other libraries built on top of OpenGL that might be useful as well.
Edit: OpenGL itself is installed as part of the OS. Headers and libraries for OpenGL 1.1 are included with VS 2010, so if you don't need newer features, you're already set. If you want to use newer functions, you probably want to use GLEW or GLEE.