Geometry library in C++ [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am looking for an easy to use and well documented geometry library in c++. I would like to use it in 3D perception that I am dealing with point clouds. Coordinate transformations, rotations and translations are my special concern now. Any suggestion?

A very powerful library is cgal. Some of the functions in opengl may also be of use.

Check out Boost::Geometry
It has some basic point definitions and coordinate systems as well as distance calculations. From there you can extend it as needed.
There's also some intersection routines and things to find convex hulls from clouds of points.

Check out this site. It gives you a very good overview about existing geometry libraries, even with some pros and cons.
Update:
And you may also have a look at the Point Cloud Library. It's quite a new library for working with point clouds, easy to understand and has plenty of good tutorials to get started with!

PLIB: A Suite of Portable Game Libraries
Note: Just because it says "game" it doesnt mean you cant use it in anything other than developing games.

If you're going to render your geometries in a VGA screen, I strongly recommend you to use microsoft DirectX library which is the best one for graphics rendering. Otherwise, just go with Boost::Geometry library which would be enough for your purpose.

Related

Rendering a n-body simulation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm using openCL to simulate a n-body problem. The output I'm getting is positions of particles in 3-dimensional space (x,y,z). What I want to do now is to render them frame by frame and was just wondering how I would go around to getting that done. I'm using C++ and do not have any previous experience with graphics.
If you could point me in the right direction that would be awesome.
Thanks
If you're just looking for a graphics library to use, I recommend SFML. I am actually using it for a similar project right now and it works great! http://www.sfml-dev.org/
This is a broad question and likely to get closed but some starting points could be:
Using openCL/openGL interoperability to directly render your data
If speed is not crucial and you don't mind transferring data back to the host you might use openGL libraries (steep learning curve) or Windows-specific DirectX (hard) or GDI+ (easier and basic graphic capabilities)
Other simpler alternatives: sfml or openGL wrappers like OGLplus
Notice that you didn't describe how you're going to render that data or what are your expectations. This makes the question impossible to be answered correctly. Just guessing is possible.
There are many ways to achieve your goal. The most common ones would be to use either OpenGL or Direct3D. Both can be hooked with OpenCL. I'm an OpenGL guy, so I'd recommend you OpenGL, but Direct3D is a very nice API if you plan on targeting Windows based systems only.
Take some time and search for the keywords OpenCL/OpenGL interop or OpenCL/Direct3D interop and you shoul find a lot of stuff.

Shapes drawing simple library for OpenGL, is there any? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm learning OpenGL and after reading several tutorials and books still didn't find the answer to a simple question: is there a lightweight free software library for drawing basic 2D shapes and figures in OpenGL such as arcs and ellipses for example. After having googled for 'drawing ellipse in OpenGL' I can't believe that all of several dozens recipes that I read on this topic - all of them are dealing with 'manual' construction of ellipse out of points or lines in the 'for' loop. I know that for instance GLUT or SFML have functions for drawing circles, but they are not specialized graphics libraries and also they don't draw arcs. What I need is a simple library without any context management or windowing functionality which can draw basic 2D shapes into a buffer.
Well, Cairo has a OpenGL backend, but that might actually be too heavyweight for your liking. But it offers a very versatile set of 2D drawing primitives and definitely is worth looking at.

Very easy to use 2d (optionally 3d) drawing library / wrapper for directx or opengl? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm studying physics and I know C++ at a basic level. at my study it's sometimes really useful to create a program which can graphicly represent some data or do calculations and then graphicly represent them. I read that, for example, to be able to master the basics of openGL I would need to do a 10 week long course of openGL. But that is too much time.
I'm wondering if there are any libraries available (for windows) which allow me to do some easy stuff like:
-DrawPixel(x,y,color)
-DrawCircle/Line/Shape/Polygon([list of points])/Triangle/Square (+rotation)
-DrawImage(filename,width,height,etc...)
-DrawText()
Is there any library which has this easyness? It would be really cool because if I do something (create a program) and I need to explain my team (who have never programmed) how I have done it (the program / results), this would make it much easier to explain!
I looked at SDL, HGE, OpenFrameworks (somewhat the "closest" yet still far away) and a few other popular libraries but they are all so far away.. why is there no such easy library?
Are there any available which are just not being found with the keywords i search in google?
I would suggest that you take a look at cinder. Try out the Hello Cinder tutorial. I think you will find it supports your needs by providing an abstraction layer above DirectX or OpenGL.

3D C++ Arbitrary Mesh Triangulation Library? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking for a C++ library to triangulate arbitrary 3D meshes. Preferably open-source but at the very least free for commercial use (so CGAL is pretty much out of the question).
I looked at GTS, but it's written in C (is C compatible with C++?), it's old, and the binaries are for Debian platforms (I need Windows binaries or source that can be compiled in VC++ 2008).
Any help would be much appreciated.
Additionally:
If it's possible to use a 2D polygon triangulation library such as polypartition or poly2tri by triangulating each face separately, I can guarantee every face stays on its own plane (every face is flat and all the vertices are on the same plane) and has no holes. I'm not sure how I would go about translating the 3D rotation of the face to 2D space; I assume you would need to use the face's normals. I'm also not sure whether the generated 2D vertices could easily be merged back into the 3D mesh if you were to triangulate each face separately.
I worked it out myself. Turns out the library that generated the mesh that needed triangulating, Carve, isn't necessarily free for commercial use, so I had to find an alternative. I found Boost (I didn't realise it had these kinds of functions), which has the perfect license for me, is free, of high quality, and seems to have the functions I need. So...hooray!
Check out umeshu.
It's under the MIT license.

Best library for statistics in C++? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking for high performance code (needs to run in real-time), preferably open source, but if there is nothing that's free and high-perf, I'll take something well supported and of high quality for a cost.
Any suggestions?
These are the ones I've found so far, in no particular order:
CodeCogs
GSL
Cephes
Boost MathToolkit
Blitz++
TNT
Check the links on mathtools.net. The page for statistics libraries for C++ has links. Another page http://www.thefreecountry.com/sourcecode/mathematics.shtml lists few more.
Have you checked the 'R project'? I think you can call 'R objects' from C/C++.
I'm surprised nobody's mentioned ALGLIB: http://www.alglib.net/
Root has pretty good statistical support. At least as us particle physics types judge these thing. Works in cint interpretation or as a native c++ library.
TNT is for matrix calculations but doesn't have any statistics functionality. (e.g. erf, mean/std/cov etc)
I haven't used Boost Math Toolkit, but skimming through the documentation, it looks like it has the opposite problem, e.g. lots of goodies for scalar calculations, but no support (that I could find) for multivariate situations.
I have used the IT++ library in the past, this library supports ACML and MKL routines trough BLAS and LAPACK. If it are calculations that need to happen fast, there is the possibility of using this library together with HPC, this is an although undocumented feature so some thought will be required.
The focus on this library is however positioned on matrix calculations, but many normal mathematic and statistic functions can be found in this framework thanks to its excellent signal processing support.